Insight

XML Sitemaps and Robots.txt Explained for Business Owners

Published February 18, 2026

Short answer: An XML sitemap is a list of the pages you want search engines to find. A robots.txt file tells crawlers which parts of your site they may visit. Together they guide how search engines discover your site. Mistakes in either one, such as blocking important pages or listing broken ones, can quietly hold back your rankings.

Most business owners never look at these two files, and that is fine as long as they are set up correctly. But when they are wrong, they can cause problems that are hard to spot from the outside. A single line in robots.txt can stop search engines from reading an entire site. A messy sitemap can send Google to pages that no longer exist.

This guide explains both files in plain language and shows you how to check yours. For a broader look at site health, see our technical SEO checklist.

What an XML sitemap does

An XML sitemap is a file that lists the important pages on your website. Search engines use it as a guide to discover your content, especially new pages or pages that are not well linked from elsewhere on your site.

A sitemap does not guarantee that a page will be indexed or ranked. It is a helpful hint, not a command. But it makes discovery easier and gives you a way to tell search engines which pages you consider important.

Where to find yours

Many websites have a sitemap at an address like yourdomain.com/sitemap.xml or yourdomain.com/sitemap_index.xml. WordPress creates one automatically, and SEO plugins like Yoast create their own. Some builders such as Wix and Squarespace generate sitemaps automatically as well.

What a good sitemap includes

  • Pages you want to appear in search, such as service pages, location pages and blog posts
  • Only pages that load correctly, not broken or redirected addresses
  • Only the main version of each page, not duplicates

What to keep out of it

  • Thank you pages, login pages and admin areas
  • Pages marked noindex
  • Thin pages like empty tag or author archives, unless they are genuinely useful
  • Test pages or old drafts

What robots.txt does

Robots.txt is a small text file at the root of your website, at yourdomain.com/robots.txt. It gives instructions to crawlers about which parts of your site they are allowed to visit. Most reputable search engines follow it.

A typical small business robots.txt file is short. It usually allows all crawlers, blocks a few areas like the admin section and points to the sitemap.

What robots.txt can and cannot do

Robots.txt controls crawling, not indexing. If you block a page in robots.txt, search engines may still list the address in results if other sites link to it, but they will not be able to read the content. To keep a page out of search results, use a noindex tag instead and allow crawlers to see it.

Common mistakes that hide websites

Blocking the whole site by accident

During development, designers sometimes block all crawlers to keep an unfinished site out of search. If that setting is not removed at launch, the live site stays hidden. In WordPress, check the setting under Reading that discourages search engines from indexing the site.

Blocking important files

Blocking folders that contain your site’s styles or scripts can stop search engines from seeing how your pages actually look. Modern guidance is to let crawlers access these files.

Listing broken pages in the sitemap

If your sitemap includes pages that return errors or redirect elsewhere, it sends mixed signals. Keep it clean so it only lists pages that load properly.

Having multiple conflicting sitemaps

Sometimes a site has a sitemap from WordPress, another from an SEO plugin and an old one from a previous design. It is best to use one main sitemap, or a sitemap index that links to the others, and to submit only that one.

Forgetting to update after a redesign

A new website may change page addresses. Make sure the new sitemap reflects the new structure and old addresses are redirected properly.

How to check your own files

  • Visit yourdomain.com/robots.txt and read it. Look for any line that blocks the whole site.
  • Visit your sitemap address and confirm it loads and lists your important pages.
  • Open a few addresses from the sitemap to make sure they load.
  • In Google Search Console, open the Sitemaps report and check that your sitemap was read without errors.
  • Use the URL Inspection tool on a key page to confirm Google can crawl and index it.

Submit your sitemap to search engines

Submitting your sitemap in Google Search Console and Bing Webmaster Tools helps both search engines find it. Adding a sitemap line to your robots.txt file also helps other crawlers discover it. These are free steps that take just a few minutes.

When to get help

If you see errors you do not understand, pages missing from Google or a robots.txt file with rules you did not write, it is worth having someone review it. Small technical problems can have large effects on visibility, and they are usually quick to fix once found. Our technical SEO service covers exactly this kind of review.

Frequently asked questions

Do small websites need a sitemap?

Small, well linked sites can be found without one, but a sitemap is easy to set up and helps search engines discover pages quickly. Most platforms create one automatically.

Will robots.txt keep a page out of Google?

Not reliably. It stops crawling but not necessarily listing. Use a noindex tag to keep a page out of search results.

How often should you check these files?

Check them after any redesign, platform change or major site update, and take a quick look every few months.

Next step

Want to make sure search engines can see your whole website? Book a free 15 minute visibility audit and we will check for hidden technical problems and show you what to fix first.

Ready to apply this to your business?

Free audit. We'll tell you exactly where you stand. Websites start at $2,500.

Get a Free Audit
Check my site Call or Text