Skip links
Published on: Website

How to add a sitemap to Robots.txt. File

How to add a sitemap to Robots.txt. File

Let us learn How to add a sitemap to Robots.txt. File. And understand Why is it important if you have your website.

Having a website. But, not having good knowledge about its tricks can be a problem. Issues may occur which are easy to eliminate. Today, websites are the first source of trust when it comes to business. If you have a website it is very important to have a good Google ranking. Or at least get your website on top Google searches. If you are a website owner or developer you probably already know how is this important for the growth of your website.

Two types of files are used in order to give information bots need to read your website; Robots.txt.file and XML Sitemap.

What is Sitemap

Sitemap collects a list of your websites URL. Creates a path or say road. So that your content can reach out to the search engines. For instance, your homepage connects 5 pages and these pages are connected to each other through internal links. Sitemaps are very important and useful if your website have:

  • More than a hundred of pages and deep website architecture.
  • You need to add new pages frequently.
  • Constantly change the content of your page.
  • You do not have a strong external link profile.
  • Have a weak internal linking and orphan pages.

What is Robots.txt.file

Within the root directory of your website. A simple text file Robots.txt.file is located. The content present in that file provides information to search engine tools on what pages they have to crawl and on what not to crawl. This file also takes care of what type of files have permission to crawl on your website. This file is important because as soon as bots enter your site they start locating this file. If file not found then your content might not reach out to more people.

How to add a sitemap to Robots.txt. File

This is a very simple three step process:

  1. Just in case your developer had already created a sitemap for you. Then you only need to locate it. To locate your sitemap URL. For instance, suppose your domain name is ‘XYZ’, then type https:// www.XYZ.com/sitemap.xml. Browse your sitemap to check if it is located or not. If error 404 is shown that means your sitemap is not located. You can either create a sitemap for your self or ask the developer to create it for you. If do not have knowledge about site mapping do not do it yourself.
  2. Just like you sitemap search for Robots.txt.File. If you do not find file make sure to create one. Then add that file to your web servers root directory if it is not located there.
  3. To add sitemap location to robots.txt.file locate to your Robots.txt.file. Then edit your Robots.txt.file with the URL of your sitemap. For example, your sitemap URL is https:// www.XYZ.com/sitemap.xml after adding URL Robots.txt.file should look like https:// www.XYZ.com/sitemap.xml User-agent: * Disallow:

Hope this article helped you understand How to add a sitemap to Robots.txt. File. Thank you for visiting us, keep reading.

Leave a comment