How To Add Your Sitemap To Your Robots.txt File

To add your sitemap to your robots.txt file, follow these steps:

  1. Locate your robots.txt file: Your robots.txt file is typically located at the root directory of your website. For example, if your website is, your robots.txt file would be located at
  2. Open your robots.txt file: Open your robots.txt file in a text editor or through your website’s file manager.
  3. Add the sitemap URL: To add your sitemap URL to your robots.txt file, use the following format:

    Sitemap: URL of your sitemap

    For example, if your sitemap URL is, add the following line to your robots.txt file:


  4. Save your robots.txt file: Save your robots.txt file and upload it to your website’s root directory, overwriting the old robots.txt file if necessary.
  5. Test your robots.txt file: To test your robots.txt file, use Google Search Console’s robots.txt Tester or a similar tool to ensure that it is formatted correctly and that your sitemap URL is being recognized.

By adding your sitemap URL to your robots.txt file, you are making it easier for search engine crawlers to find and index your website’s pages.