Web Analytics Made Easy -
StatCounter More than one sitemap directive in a robots.txt file ? - CodingForum

Announcement

Collapse
No announcement yet.

More than one sitemap directive in a robots.txt file ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • More than one sitemap directive in a robots.txt file ?

    Hi,
    I have read that it is good to make it easy for spiders by
    giving the url of the sitemap in the robots.txt file.

    But I also read that you can have a plain text version
    or / and an html version or / and an xml version of the sitemap.

    So, since my sitemap is generated by my script, I created all three versions.

    So my question is, can there be more than one sitemap directive
    in the robots.txt file ?

    e.g.

    User-agent: *
    Disallow:

    Sitemap: _http://www.example.com/sitemap.xml // ignore the preceding _
    Sitemap: _http://www.example.com/sitemap.htm
    Sitemap: _http://www.example.com/sitemap.txt


    Will all get used ?
    Or only the first one ?

    Is it best to put the xml version first ?

    Many thanks.
    David.
    Last edited by jeddi; Sep 14, 2016, 10:44 AM.
    If you want to attract and keep more clients, then offer great customer support.

    Support-Focus.com. automates the process and gives you a trust seal to place on your website.
    I recommend that you at least take the 30 day free trial.

  • #2
    Search engines use the sitemap.xml to find all the pages on complex web sites.

    The sitemap.htm page should be linked to from all the pages on your site so that people visiting the site can use it to find the page they are looking for.

    The sitemap.txt file doesn't get uploaded at all.

    The second and third of these DO NOT go in the robots.txt file.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

    Comment


    • #3
      OK

      So the sitemap.xml goes in the robots.txt file

      and I already have a link for the sitemap.html (with a pretty symbol )
      on every page.

      So what can I use the sitemap.txt for ?

      Anything ???

      Thanks.
      If you want to attract and keep more clients, then offer great customer support.

      Support-Focus.com. automates the process and gives you a trust seal to place on your website.
      I recommend that you at least take the 30 day free trial.

      Comment

      Working...
      X