e Learning

How to Add Sitemap in Robots.txt File

We use robots.txt file to give Instructions to Search Engines and web crawlers. By Adding your Web Site Sitemap in robots.txt file will make it easier for Search Engines to Index your Web Pages. This is also Something You must do when it comes to Search Engine Optimization (SEO).

For this example, I assumed your Website name is example.com and path to your site map url is example.com/sitemap.xml.

Open robots.txt File in a Text Editor and Add The Following Line.

Sitemap: https://example.com/sitemap.xml

Now when a Web crawler came to index your site, it will automatically recognize your XML Sitemap.