Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Senior Coder
    Join Date
    May 2006
    Posts
    1,868
    Thanks
    31
    Thanked 4 Times in 4 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 14th, 2016 at 03:44 PM.
    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. #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    9,249
    Thanks
    4
    Thanked 932 Times in 919 Posts
    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.

  3. #3
    Senior Coder
    Join Date
    May 2006
    Posts
    1,868
    Thanks
    31
    Thanked 4 Times in 4 Posts
    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.


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •