Legal pages and cookie notices for your site

A step-by-step guide to creating privacy policy, terms of service, and cookie notice pages for Persian websites; with sample code and common mistakes.

6 min Updated 14 Oct 2026

Why Website Privacy Is No Longer an Option?

If you own a website — even a small blog or a newly established online store — you have probably heard of the EU's GDPR or similar regulations in Iran. But this is not just about complying with the law; website privacy directly affects user trust, conversion rates, and even Google rankings. Since 2021, Google has announced that it considers user experience signals (Core Web Vitals) and security (HTTPS) in its rankings, and transparent legal pages are part of that experience.

In this article, instead of generic explanations, we will show you exactly which pages you need to create, what sections each one should include, and how to implement cookie notices without annoying users. All examples are ready to copy and use on Persian websites.

Three Legal Pages Every Website Needs

Depending on the type of website (e-commerce, news, services), you may need more pages, but these three are the minimum requirement:

  • Privacy Policy Page: Explains what data you collect, why, and what rights users have.
  • Terms of Service Page: Defines the rules for using the site, responsibilities, and limitations.
  • Cookie Policy Page: Describes the types of cookies, their purpose, and how users can manage them.

These pages should be accessible via a fixed link in the footer of all pages. Users should not have to search for them.

Privacy Policy Page; The Heart of Transparency

The text of this page should be simple and non-legalistic. The average user should understand what happens to their data. Suggested sections:

  1. Introduction: Site name, domain, and date of last update.
  2. Data We Collect: Direct data (name, email in contact forms) and indirect data (IP, browser type, visited pages).
  3. Purpose of Collection: Responding to inquiries, sending newsletters (only with consent), improving user experience.
  4. Sharing with Third Parties: If you use Google Analytics or a payment gateway, name them.
  5. User Rights: The right to access, correct, delete data, and how to request it (support email).
  6. Data Security: General explanation about SSL encryption and restricted access.

A common mistake: copying the privacy policy text from a foreign website and translating it literally. This is both legally risky (because Iranian laws differ from European ones) and creates duplicate content for SEO. Write the text based on your own website's reality.

Terms of Service Page; Clear Boundaries

This page is more legal in nature and should include the following:

  • Rules for registration and use of user accounts (if you have them).
  • The site's responsibility for user-generated content (comments, reviews).
  • Purchase and return policies (for e-commerce sites).
  • Intellectual property rights of the site's content.
  • Governing law and dispute resolution authority (e.g., Tehran court).

Important note: In Iran, the Electronic Commerce Law (approved in 2003) and the Computer Crimes Law are the main references. If your site is an online store, be sure to mention Article 38 of the Electronic Commerce Law (7-day right of withdrawal).

Cookie Notice; Balancing Transparency and User Experience

Cookies are small files stored in the user's browser. Some are essential (like shopping cart cookies), some are analytical (like Google Analytics), and some are advertising-related. Website privacy requires that users know which cookies are used and have the right to choose.

Cookie Banner; The First Interaction with Users

The cookie banner should not cover the entire page or force users to click. The best approach is a bar at the bottom of the page with two buttons:

<div id="cookie-banner" style="position:fixed; bottom:0; left:0; right:0; background:#f8f9fa; padding:12px; text-align:center; z-index:9999;">
  <p>We use cookies to improve your experience. <a href="/en/cookie-policy">Learn more</a></p>
  <button onclick="acceptCookies()">I accept</button>
  <button onclick="declineCookies()">I decline</button>
</div>

A simple JavaScript script to save the user's choice:

function acceptCookies() {
  document.cookie = "cookie_consent=accepted; max-age=31536000; path=/";
  document.getElementById("cookie-banner").style.display = "none";
}
function declineCookies() {
  document.cookie = "cookie_consent=declined; max-age=31536000; path=/";
  document.getElementById("cookie-banner").style.display = "none";
}

If the user declines, you should disable analytical scripts (like Google Analytics). This is done by checking the cookie value before loading the script:

if (document.cookie.includes("cookie_consent=accepted")) {
  // Load Google Analytics
  var script = document.createElement("script");
  script.src = "https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX";
  document.head.appendChild(script);
}

Cookie Page Text; A Transparency Table

On the cookie page, create a simple table showing each cookie's name, function, and lifespan. A real example:

<table>
  <tr><th>Cookie Name</th><th>Purpose</th><th>Duration</th></tr>
  <tr><td>PHPSESSID</td><td>Maintains user login session</td><td>Until browser is closed</td></tr>
  <tr><td>_ga</td><td>Identifies unique users in Google Analytics</td><td>2 years</td></tr>
  <tr><td>woocommerce_cart</td><td>Stores shopping cart items</td><td>3 days</td></tr>
</table>

Common Mistakes in Legal Pages and Website Privacy

In reviewing dozens of Persian websites, these are the errors I have seen most often:

  • Linking to the privacy policy page only on the homepage, not in the footer: Users should be able to access it from any page.
  • Outdated update date: If you change the text, update the date too. Google values fresh content.
  • Mismatch between text and actual site functionality: If you write "We do not share your email with any third party" but use an email marketing service, that is a dangerous contradiction.
  • Cookie banner without a decline button: In the EU, this carries fines. In Iran, there is no specific law yet, but it is best to follow international best practices.
  • Using copied texts: Google penalizes duplicate content, and users can also sense the lack of honesty.

Technical Tips for SEO and Implementation

URL Structure and Internal Linking

Use simple English URLs:

/privacy-policy
/terms-of-service
/cookie-policy

In the footer, place the links with the <nav> tag and rel="nofollow". This tells Google that these pages are not for primary ranking, but their presence increases the site's credibility.

Schema for Legal Pages

By adding JSON-LD schema, you help search engines recognize the page type:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebPage",
  "name": "Privacy Policy",
  "url": "https://example.com/privacy-policy",
  "isPartOf": {
    "@type": "WebSite",
    "name": "Your Website Name"
  }
}
</script>

Important Note About Hosting

To properly implement these pages and record user choices, you need reliable hosting with SSL support. If you are looking for suitable hosting for your website, companies like ServerNet offer various options for Persian websites, but before choosing, be sure to check the technical specifications and user reviews.

Final Checklist for Launch

  1. Write the text for all three pages based on your website's actual practices (not copied).
  2. Place links to the pages in the footer of all pages.
  3. Implement the cookie banner with "Accept" and "Decline" buttons.
  4. Load analytical scripts only after cookie acceptance.
  5. Include the update date at the beginning of each page.
  6. Register and index the pages in Google Search Console.
  7. Review the text every 6 months and update if necessary.

Respecting website privacy is not just a legal requirement; it is a competitive advantage. A user who feels secure will stay longer, buy more, and recommend your site to others. Start with these simple steps and see the difference in user trust and return rates.

Was this page helpful?