Reputation: 11
I am trying to put my robots.txt and sitemap.xml file in the .htaccess folder but the was not found in website. Please help me if anyone know about this?
Upvotes: 0
Views: 1009
Reputation: 944052
They should have the URLs /sitemap.xml
and /robots.txt
. How you configure your server to make that happen will depend on your server.
Typically you just place them in the root directory (this may or may not be the same as the directory you place .htaccess
in, but often will be if you are setting configuration directives site wide) and let them be served as static files.
If you have mod_rewrite directives (as is quite common to map "friendly URLs" on to PHP based CMSs) then you may have to alter them so that those URLs don't get rerouted to the PHP program.
Upvotes: 1
Reputation: 683
.htaccess,robots.txt and sitemap.xml file should be kept inside root folder
all about robots.txt https://support.google.com/webmasters/answer/6062596?hl=en
Upvotes: 1