XML sitemap and robots.txt for your business website: how to help Google index your pages correctly

XML sitemap and robots.txt for your business website: how to help Google index your pages correctly
Published on 25/08/2026

Your website looks great and your copy is polished, but Google is not indexing several important pages. Your XML sitemap may be outdated, your robots.txt might be blocking URLs by mistake, or you may never have submitted your sitemap to Search Console. Without a clear technical foundation, you lose visibility before you even compete on content or links.

Here is what an XML sitemap and robots.txt are, how to set them up on a business website, and which mistakes to avoid so Google can find and index your pages correctly.

What is an XML sitemap and why it matters

An XML sitemap is a file that lists the URLs on your site you want search engines to know about. It does not guarantee indexing, but it makes discovery easier — especially for new sites, large sites, or sites with weak internal linking.

On a business website it typically includes the homepage, services, case studies, blog, contact page, and active landing pages. Each entry can include last modification date, change frequency, and relative priority.

  • Improves crawling when Google cannot reach certain sections through internal links alone.
  • Speeds up discovery of new pages (blog posts, new service pages).
  • Supports on-page SEO: without a proper sitemap, strong meta titles and quality content lose impact.

What is robots.txt and how it affects indexing

The robots.txt file lives at your domain root (yourdomain.com/robots.txt) and tells crawlers which paths they may or may not visit. It is a polite directive: reputable search bots respect it, but it is not security and does not hide sensitive content.

On corporate websites it is commonly used to:

  • Block private areas (admin panel, staging environments).
  • Prevent crawling of duplicate parameter URLs or catalog filters.
  • Point to your sitemap with the Sitemap: directive.

Important: blocking a URL in robots.txt does not remove it from the index if it is already indexed or linked externally. For that you need noindex tags or redirects.

Sitemap vs robots.txt: they are not the same thing

Confusing them is common. Practical summary:

  • XML sitemap → “Here are the pages I want you to know about.”
  • robots.txt → “Do not crawl these paths” (or crawl with limits).

A classic mistake: blocking /blog/ in robots.txt and then wondering why articles never appear on Google. Another: a sitemap listing URLs that robots.txt forbids crawlers from visiting.

How to create and maintain an XML sitemap on your business website

Before generating the file, decide which pages deliver commercial or brand value. Do not include thank-you pages, test versions, noindex pages, or UTM parameter duplicates.

Team reviewing a business website page structure on a diagram and laptop

Recommended steps:

  1. Audit your architecture: homepage, services, contact, blog, landing pages, and indexable legal pages.
  2. Generate the XML with your CMS, SEO plugin, or developer script. On large sites, use sitemap index files.
  3. Exclude the unnecessary: admin, internal search results, session URLs, and thank-you pages.
  4. Update on publish: every new blog post or service page should enter the sitemap automatically.
  5. Validate the format with Search Console tools or XML validators.

If you run a multilingual website, each language may have its own sitemap or a shared index. Make sure canonical URLs and hreflang tags stay aligned.

robots.txt: directives you should know

A minimal robots.txt for a business site might look like:

User-agent: *
Disallow: /admin/
Disallow: /api/
Allow: /

Sitemap: https://www.yourdomain.com/sitemap.xml

Useful directives:

  • User-agent: * — applies to all bots (you can create rules for Googlebot specifically).
  • Disallow: /path/ — blocks crawling of that path.
  • Allow: /public-path/ — exception inside a blocked path.
  • Sitemap: — absolute URL of your main sitemap.

Review robots.txt whenever you launch a new section, subdomain, or accidentally indexable staging environment.

How to submit your sitemap to Google Search Console

Hosting the file on your server is not enough — register it in Google Search Console.

Google Search Console screen showing XML sitemap submission status

  1. Verify your domain property in Search Console.
  2. Go to Sitemaps in the sidebar.
  3. Enter the relative path (sitemap.xml or sitemap_index.xml).
  4. Submit and monitor errors: blocked URLs, 404s, redirects, or noindex pages.

Combine this with the Pages report to see which URLs are indexed, excluded, or have crawl issues.

Common mistakes on business websites

  • Outdated sitemap after a redesign or URL change without 301 redirects.
  • Overly restrictive robots.txt blocking CSS, JS, or public sections.
  • Including noindex URLs in the sitemap (contradictory signals).
  • Forgetting the sitemap in robots.txt or pointing to the wrong URL.
  • Not reviewing after migrations: new domain, forced HTTPS, or blog structure changes.
  • Duplicate sitemaps from SEO plugins without cleaning up the old one.

If you use Schema structured data and well-planned internal links, your sitemap reinforces coherent technical SEO — it does not replace it.

Quick technical indexing checklist

Before launching a new section or after a redesign, check:

  • Does /sitemap.xml exist, return 200, and load correctly?
  • Does robots.txt include a Sitemap: directive with an absolute URL?
  • Are important pages in the sitemap and not blocked in robots.txt?
  • Does Search Console show the sitemap as “Success”?
  • Do sitemap URLs match published canonical URLs?
  • Do new blog posts enter the sitemap automatically when published?

Conclusion: indexing is the foundation of your SEO

Your XML sitemap and robots.txt are not developer trivia — they are the foundation for Google to discover your value proposition, services, and content. Configure them properly, review them after every structural change, and monitor Search Console regularly.

If you want a technical audit of your website — sitemap, robots, indexing, and performance — tell us about your project and we will help fix what is holding back your visibility.

Àlex
Àlex
CEO & Full Stack Developer

More from the blog

Contact us

Reach out through your preferred channel and we will get back to you as soon as possible.

Contact us