How can I allow robots access to my sitemap, but prevent casual users from accessing it?
Posted
by
morpheous
on Pro Webmasters
See other posts from Pro Webmasters
or by morpheous
Published on 2010-07-20T09:33:33Z
Indexed on
2011/01/13
2:59 UTC
Read the original article
Hit count: 341
I am storing my sitemaps in my web folder. I want web crawlers (Googlebot etc) to be able to access the file, but I dont necessarily want all and sundry to have access to it.
For example, this site (superuser.com), has a site index - as specified by its robots.txt file (http://superuser.com/robots.txt).
However, when you type http://superuser.com/sitemap.xml, you are directed to a 404 page.
How can I implement the same thing on my website?
I am running a LAMP website, also I am using a sitemap index file (so I have multiple site maps for the site). I would like to use the same mechanism to make them unavailable via a browser, as described above.
© Pro Webmasters or respective owner