Answers.Body: <p>Without having to use a separate Plugin this is a good basic practice on setting up basic SEO for your site.</p>
  
  <p>First create three new fields called "<strong>seoTitle</strong>", "<strong>seoDescription</strong>" and "<strong>seoKeywords</strong>". Put these three fields in a Global group called "<strong>globalSeo</strong>".</p>
  
  <p>In your layout template "<em>layouts/_layout.html</em>"</p>
  
  <pre><code>    {% set seoTitle = globalSeo.seoTitle %}
      {% set seoDescription = globalSeo.seoDescription %}
      {% set seoKeywords = globalSeo.seoKeywords %}
      &lt;!DOCTYPE html&gt;
      &lt;html&gt;
          &lt;head&gt;
              &lt;title&gt;{% if title is defined %}{{ title }}{% else %}{{ seoTitle }}{% endif %}&lt;/title&gt;
              &lt;meta name="description" content="{% if description is defined %}{{ description }}{% else %}{{ seoDescription }}{% endif %}"/&gt;
              &lt;meta name="keywords" content="{{ seoKeywords }}"/&gt;
  
              {# You can then use the same fields for Facebook tags etc.. or create separate fields. #}
              &lt;meta property="og:title" content="{% if title is defined %}{{ title }}{% else %}{{ seoTitle }}{% endif %}"/&gt;
              &lt;meta property="og:description" content="{% if description is defined %}{{ description }}{% else %}{{ seoDescription }}{% endif %}"/&gt;
          &lt;/head&gt;
      &lt;body&gt;
  </code></pre>
  
  <p>You can now per template override these standard variables with your own for that particular page and/or template.</p>
  
  <p>For a template:</p>
  
  <pre><code>    {% extends "layouts/_layout" %}
      {% set title = "This is a my custom Page Title" %}
      {% set description = "This is a my custom Page Description" %}
  </code></pre>
  
  <p>For a entry:</p>
  
  <pre><code>    {% extends "layouts/_layout" %}
      {% set title = entry.title %}
      {% set description = entry.descriptionField %}
  </code></pre>
  
  <p>.. or if you want to user to have custom control over the entry SEO as well you can always add the same "<strong>seoTitle</strong>" fields to the entry's Channel/Structure/Single and do:</p>
  
  <pre><code>    {% extends "layouts/_layout" %}
      {% set title = entry.seoTitle %}
      {% set description = entry.seoDescription %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-08T05:58:22.870Z
Answers.Text: Thanks for the clear explanation, naboovalley! This is how I think most do it and I would do it as well.
Answers.UserDisplayName: Ryan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-02T21:34:24.343Z
Answers.Text: Well explained. This is just about exactly what I do, it has worked well. I set up a bunch of global defaults, including OG (open graph) stuff, and let the user override them on a per-entry basis if they want.
Answers.UserDisplayName: 4midori
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-08T05:55:26.980Z
Answers.LastActivityDate: 2016-06-14T11:17:06.800Z
Answers.LastEditDate: 2016-06-14T11:17:06.800Z
Answers.UserDisplayName: naboovalley
Answers.Body: <p>Completely biased answer, but check out my <a href="https://github.com/khalwat/seomatic" rel="nofollow noreferrer">SEOmatic plugin</a>.  It's pretty comprehensive, and it's free.  If you're running Craft CMS 3, the <a href="https://github.com/nystudio107/craft-seomatic" rel="nofollow noreferrer">SEOmatic plugin is available</a> for Craft CMS 3 as well (but is not free).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-02T09:18:14.833Z
Answers.Text: You're biased but to be fair it's a really good plugin so that's allowed. :)
Answers.UserDisplayName: foamcow
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-08T07:18:59.213Z
Answers.LastActivityDate: 2018-03-28T14:07:11.820Z
Answers.LastEditDate: 2018-03-28T14:07:11.820Z
Answers.UserDisplayName: andrew.welch
Answers.Body: <p>Heres article on my blog about setting up basic SEO functionality for Craft CMS:</p>
  
  <p><a href="http://craftsnippets.com/articles/basic-seo-functionality-for-craft-cms" rel="nofollow noreferrer">http://craftsnippets.com/articles/basic-seo-functionality-for-craft-cms</a></p>
  
  <p>It presents two options:</p>
  
  <ul>
  <li>Using pure Twig code for handling <code>&lt;title&gt;</code> metatag.</li>
  <li>Setting up basic SEOmetatags using <a href="https://plugins.craftcms.com/seomate" rel="nofollow noreferrer">Seomate plugin</a></li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-02T20:35:14.983Z
Answers.LastActivityDate: 2019-10-02T20:35:14.983Z
Answers.UserDisplayName: Piotr Pogorzelski
Answers.Body: <p>You basically have two options...</p>
  
  <p><strong>In the world of plugins</strong>, check out the <a href="https://github.com/nystudio107/seomatic" rel="nofollow noreferrer">SEOmatic plugin</a> or <a href="http://sprout.barrelstrengthdesign.com/craft-plugins/seo" rel="nofollow noreferrer">Sprout SEO plugin</a>. </p>
  
  <p>On Craft 2, SEOmatic is free, Sprout SEO is $99. </p>
  
  <p>On Craft CMS 3, the <a href="https://github.com/nystudio107/craft-seomatic" rel="nofollow noreferrer">SEOmatic plugin</a> and <a href="https://github.com/barrelstrength/craft-sprout-seo" rel="nofollow noreferrer">Sprout SEO plugin</a> are both available and $99.</p>
  
  <p><strong>If you'd rather not use a plugin</strong>, then you're on your own to create and implement whatever fields you think you'll need. Depending on how you're approaching SEO, it could be fields like "Keywords", "Description", etc... and/or fields for the Facebook OG tags, or whatever you want! At that point, implementing your SEO fields would be nearly identical to implementing any other fields in Craft.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-08T05:30:06.087Z
Answers.Text: Ok great, thanks. Surprised this hasn't been asked before.
Answers.UserDisplayName: Ryan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-08T05:34:13.653Z
Answers.Text: [A variation of it has...](http://craftcms.stackexchange.com/q/2753/45) from which I partially recycled this answer.
Answers.UserDisplayName: Lindsey D
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-01T00:36:49.317Z
Answers.Text: How do you deal with channel "index" or "listing" page metas? Since we can't control de fields of those pages?
Answers.UserDisplayName: jlcharette
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-01T05:01:20.543Z
Answers.Text: @JCharette I'd recommend posting a new question. Feel free to link back to this one for reference if it helps.
Answers.UserDisplayName: Lindsey D
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2014-10-08T05:20:12.587Z
Answers.LastActivityDate: 2018-08-03T15:03:07.757Z
Answers.LastEditDate: 2018-08-03T15:03:07.757Z
Answers.UserDisplayName: Lindsey D
Body: <p>How do you guys handle SEO? Do you just make your own meta fields and add them in the template manually or am I missing something? I did notice there are some plugins being developed but there are sites in the wild now so it's been handled some how. Thanks!</p>
  
Tags: <templating><seo>
Title: How do you handle SEO on your site?
ThreadText: # How do you handle SEO on your site?
  
  (Asked by: username_0 on 2014-10-08)
  
  How do you guys handle SEO? Do you just make your own meta fields and add them in the template manually or am I missing something? I did notice there are some plugins being developed but there are sites in the wild now so it's been handled some how. Thanks!
  
  **Tags:** templating, seo
  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_6 on 2014-10-08. Score: 17 | Accepted answer
  
  You basically have two options...
  
  **In the world of plugins**, check out the [SEOmatic plugin](https://github.com/nystudio107/seomatic) or [Sprout SEO plugin](http://sprout.barrelstrengthdesign.com/craft-plugins/seo).
  
  On Craft 2, SEOmatic is free, Sprout SEO is $99.
  
  On Craft CMS 3, the [SEOmatic plugin](https://github.com/nystudio107/craft-seomatic) and [Sprout SEO plugin](https://github.com/barrelstrength/craft-sprout-seo) are both available and $99.
  
  **If you'd rather not use a plugin**, then you're on your own to create and implement whatever fields you think you'll need. Depending on how you're approaching SEO, it could be fields like "Keywords", "Description", etc... and/or fields for the Facebook OG tags, or whatever you want! At that point, implementing your SEO fields would be nearly identical to implementing any other fields in Craft.
  
  > **Comments:**
  > **username_0**: Ok great, thanks. Surprised this hasn't been asked before.  
  > **username_6**: [A variation of it has...](http://craftcms.stackexchange.com/q/2753/45) from which I partially recycled this answer.  
  > **username_7**: How do you deal with channel "index" or "listing" page metas? Since we can't control de fields of those pages?  
  > **username_6**: @JCharette I'd recommend posting a new question. Feel free to link back to this one for reference if it helps.  
  
  ---
  
  ### Answer by username_1 on 2014-10-08. Score: 34
  
  Without having to use a separate Plugin this is a good basic practice on setting up basic SEO for your site.
  
  First create three new fields called "**seoTitle**", "**seoDescription**" and "**seoKeywords**". Put these three fields in a Global group called "**globalSeo**".
  
  In your layout template "*layouts/\_layout.html*"
  
  ```
      {% set seoTitle = globalSeo.seoTitle %}
      {% set seoDescription = globalSeo.seoDescription %}
      {% set seoKeywords = globalSeo.seoKeywords %}
      <!DOCTYPE html>
      <html>
          <head>
              <title>{% if title is defined %}{{ title }}{% else %}{{ seoTitle }}{% endif %}</title>
              <meta name="description" content="{% if description is defined %}{{ description }}{% else %}{{ seoDescription }}{% endif %}"/>
              <meta name="keywords" content="{{ seoKeywords }}"/>
  
              {# You can then use the same fields for Facebook tags etc.. or create separate fields. #}
              <meta property="og:title" content="{% if title is defined %}{{ title }}{% else %}{{ seoTitle }}{% endif %}"/>
              <meta property="og:description" content="{% if description is defined %}{{ description }}{% else %}{{ seoDescription }}{% endif %}"/>
          </head>
      <body>
  
  ```
  
  You can now per template override these standard variables with your own for that particular page and/or template.
  
  For a template:
  
  ```
      {% extends "layouts/_layout" %}
      {% set title = "This is a my custom Page Title" %}
      {% set description = "This is a my custom Page Description" %}
  
  ```
  
  For a entry:
  
  ```
      {% extends "layouts/_layout" %}
      {% set title = entry.title %}
      {% set description = entry.descriptionField %}
  
  ```
  
  .. or if you want to user to have custom control over the entry SEO as well you can always add the same "**seoTitle**" fields to the entry's Channel/Structure/Single and do:
  
  ```
      {% extends "layouts/_layout" %}
      {% set title = entry.seoTitle %}
      {% set description = entry.seoDescription %}
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks for the clear explanation, username_1! This is how I think most do it and I would do it as well.  
  > **username_2**: Well explained. This is just about exactly what I do, it has worked well. I set up a bunch of global defaults, including OG (open graph) stuff, and let the user override them on a per-entry basis if they want.  
  
  ---
  
  ### Answer by username_3 on 2016-01-08. Score: 14
  
  Completely biased answer, but check out my [SEOmatic plugin](https://github.com/khalwat/seomatic). It's pretty comprehensive, and it's free. If you're running Craft CMS 3, the [SEOmatic plugin is available](https://github.com/nystudio107/craft-seomatic) for Craft CMS 3 as well (but is not free).
  
  > **Comments:**
  > **username_4**: You're biased but to be fair it's a really good plugin so that's allowed. :)  
  
  ---
  
  ### Answer by username_5 on 2019-10-02. Score: 0
  
  Heres article on my blog about setting up basic SEO functionality for Craft CMS:
  
  <http://craftsnippets.com/articles/basic-seo-functionality-for-craft-cms>
  
  It presents two options:
  
  * Using pure Twig code for handling `<title>` metatag.
  * Setting up basic SEOmetatags using [Seomate plugin](https://plugins.craftcms.com/seomate)
  
  
  ---
  
  