Add your agreement to a hand-coded website

Paste the HTML code of your agreement from TermsFeed Agreements & Policies into a page of your website, or link its Live Link from every footer. The code puts the text on your own domain, inside your own layout and styles, as a copy you replace after each change. The Live Link always shows the text you saved last, on a page of the TermsFeed app.

Follow these steps on any platform without a guide of its own, such as Ghost or Drupal. Paste the code where the platform accepts raw HTML in a page, and add the link where it edits the footer. Compare the 2 methods in Live Link, HTML Code, or Download File.

A site you deploy on Cloudflare Pages takes its pages from a project folder and sends a path to the Live Link with a _redirects file. Follow Add a Legal Agreement to Cloudflare Pages for it.

Setup takes 3 steps and about 15 minutes. Have these ready first.

  1. Activate your agreement in the TermsFeed app.
  2. Get write access to the HTML files or templates of your website and a way to upload them.
  3. Open Copy HTML for your agreement and check that it shows the code. The "Copy HTML is not included" notice in place of the code leaves you the footer link to the Live Link.

Step 1: Copy the HTML code of your agreement

Copy the code in the language the page shows.

  1. Open your agreement in the TermsFeed app and select Copy HTML in the sidebar.
  2. Select the tab of the language you publish, where the screen shows tabs.
  3. Click Copy under the code.

The code is a fragment for the content area of a page, with no <html>, <head>, or <body> element and no styles. It opens with the agreement name in an <h1> and a "Last updated" line, then headings, paragraphs, lists, and links. Read what else the code holds, such as the "Contents" list, in Copy Your Agreement as HTML Code.

Step 2: Paste the code into a page of your website

Paste the code into the main content area of a page that uses your site layout, so the policy keeps your header, footer, and styles. Save the file as UTF-8 and keep the charset meta tag, so accented letters and typographic quotes in the text show as written.

Use this page as the shape of a new page for your agreement, here privacy-policy.html. Replace the comment with the code, and keep your own header and footer markup.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Privacy Policy - Example Store</title>
  <link rel="stylesheet" href="/css/site.css">
</head>
<body>
  <main class="policy">
    <!-- Paste the HTML code from the Copy HTML screen here -->
  </main>
</body>
</html>

Style the pasted text inside the policy wrapper, so your rules do not reach the rest of your pages. The Appearance settings in the TermsFeed app style the Live Link only. Target the Contents list with the class toc-list, and each "#" link that "Show heading anchors" adds with the class heading-anchor.

.policy {
  max-width: 960px;
  margin: 0 auto;
  line-height: 1.75;
}

.policy h2 {
  margin-top: 2em;
}

.policy a {
  text-decoration: underline;
}

.policy .toc-list {
  list-style: none;
  padding-left: 0;
}

Upload the page to your server, and link it from the footer of every page in Step 3.

Add the link to the footer template or to the footer of each page, so visitors reach the agreement from anywhere on the site. Point it at your new page, or at the Live Link to keep the text on the TermsFeed app. Copy the Live Link from the Install screen of the agreement, with Copy beside the address under "Your Live Link".

Add one of these links to the <footer> of your pages, with your Live Link in place of YOUR_LIVE_LINK.

<footer>
  <a href="/privacy-policy.html">Privacy Policy</a>
  <a href="YOUR_LIVE_LINK">Terms and Conditions</a>
</footer>

Visitors who follow a link to the Live Link leave your domain for the agreement page on the TermsFeed app. Find what they see there in Share a Hosted Agreement Link.

How to check the policy on your live website

Upload every changed file and clear the cache of your content delivery network (CDN), where you use one, before the check. A private window loads the site without cached pages from your own browser.

  1. Open a private window and load a page of your site.
  2. Click the agreement link in the footer. Your policy page opens on your domain and shows the agreement in your site styles, or the Live Link opens on the TermsFeed app.
  3. Click a heading in the "Contents" list, where the code has one. The page scrolls to that heading, and its id shows after # in the address bar.
  4. Open the Live Link of the same agreement and compare the "Last updated" line with your page. The 2 dates match while the pasted copy is current.
  5. Press Ctrl+U on your policy page and search the source for <h1>. The source shows a single <h1> element, the one that opens the agreement.

Common mistakes with a hand-coded policy page

Open the page source first, because most mistakes show there before they show on the page.

  • The page has 2 <h1> headings. Your layout prints a page heading, and the code opens with its own <h1>. Delete the <h1> line from the code, or leave the page heading out of the layout of the policy page.
  • The page shows old text. The file keeps the code from the day you pasted it. Copy the code again after you change your answers or edit the text in the Text Editor, and replace the old code in the file.
  • The text looks unstyled. The stylesheet of your site does not load on the new page. Link the stylesheet in the <head>, as the example page does.
  • The Contents links go to the wrong place. Another element on the page has the same id as a heading of the code, such as id="contents". Rename the id in your layout and keep the ids of the code.
  • The footer link misses some pages. The link went into one page, not into the shared footer template. Add it to the template, or to every page that has a footer.
  • The footer link opens the termsfeed.com website. The agreement behind the Live Link is switched off or not yet activated. Get it back with Policy Link Opens the TermsFeed Website Instead.

Your site styles, the editor of a platform, and a missing stylesheet each change how the pasted text looks. Track down the cause with Pasted Agreement Looks Wrong on Your Website.