Web development and examples of PHP, jQuery, HTML5, WordPress, MySQL & AMP


How to reference a sitemap in robots.txt

Let’s see how to reference a Sitemap in a robots.txt file in a simple and fast way.

You only have to add one line of code for each Sitemap you want to add, but normally in the robots.txt you only include the index sitemap.

For those who are not familiar with the format of a Sitemap, you can visit this link: http://www.sitemaps.org/es/protocol.html

Example to reference the sitemap in the robots.txt

Now we would only have to put the line of code in the robots.txt of the root of our website.

Cookie Policy

This website uses cookies to provide you with the best user experience. If you continue to browsing you are consenting to the acceptance of these cookies and acceptance of our cookie policy, click the link for more information.

ACCEPT
Aviso de cookies