SEO и поиск

Sitemap.xml and robots.txt: how to help search engines find your pages

Two small files decide which pages of your site a search engine will crawl and index. One wrong line in robots.txt can remove the whole site from search results. We explain what the files are for and show what they should contain.

Monolith Studio editorial team2 min read

How the two files differ

Sitemap.xml is a list of URLs you want to show a search engine, with update dates. It helps new pages get found faster, especially on large sites and projects with few inbound links. The file sits in the site root and is submitted to Search Console and Yandex Webmaster.

Robots.txt is an instruction for robots about where not to go. It blocks service sections: the cart, the account area, internal search results, and duplicates with parameters. It is important to understand that blocking in robots.txt does not remove a page from search results if external links point to it. To exclude a page completely, use the noindex meta tag.

What should go into the sitemap

  • Only pages that return a 200 code and have no redirects
  • Only pages you want to see in search
  • Canonical URLs without extra parameters and tags
  • An accurate last-modified date, not today's date on every page
  • No more than 50,000 URLs per file; otherwise split it into several
  • Different language versions, if any, linked to each other

What to block in robots.txt

Block what is not needed in search and only wastes crawl budget: the cart and checkout, the account area, filter pages with endless combinations, print pages, site search results, and test copies. Do not block style and script files: the robot needs to see the page the way a user sees it.

The file should state the sitemap address with a Sitemap line. During development, a rule blocking the whole site is often set so search engines do not see unfinished pages. The costliest mistake is forgetting to remove it at launch: the site goes unindexed for weeks and nobody understands why.

Checking after launch

  1. Open the file URLs

    your-site/robots.txt and your-site/sitemap.xml should open and contain current data.

  2. Make sure nothing is blocked

    On the live site, robots.txt must not contain a "Disallow: /" line for all robots.

  3. Submit the sitemap in webmaster tools

    In Google Search Console and Yandex Webmaster, add the sitemap URL and check the processing status.

  4. Review the indexing reports

    Pages excluded "by noindex tag" or "blocked by robots.txt" should not include important ones.

Shall we discuss your project?

Tell us in a few words what you need, and we'll suggest a solution and calculate the cost.

Discuss your project

FAQ

Does a site built on a site builder need these files too?

Most builders create them automatically, but check the contents. Sometimes they include service URLs or extra pages.

How quickly will a search engine see a new page?

From a few hours to weeks. A sitemap and a link to the new page from an already indexed one speed things up.

Didn't find your question? Message us and we'll reply within one business day.

Ask a question

Read next

We will check your site's indexing

We will look at the files and webmaster reports and find the cause if pages are not getting into search.

Call+7 708 758 18 60Message usWhatsApp
CityAktobe · we work across all of Kazakhstan

Get a quote

We'll reply within 15 minutes with an approximate price.