Checklist Guide

XML Sitemaps and robots.txt for a Medical Practice Website

Short answer

An XML sitemap lists the pages you want Google to find, and robots.txt tells crawlers which areas not to crawl. Neither is a security tool. Your sitemap should list only live, indexable pages, and robots.txt must never block pages you want in search. To keep a page out of results, use a noindex tag instead.

By Gio LaRocheUpdated 6 min read
Get my free auditor call (561) 291-2681

Two files, two different jobs

An XML sitemap is a file, usually at yoursite.com/sitemap.xml, that lists the URLs you want search engines to know about, optionally with the date each last changed. A robots.txt file sits at the root of your domain and gives crawlers instructions about which paths they should not request. One invites, the other asks crawlers to stay away. They work together, but they do not do the same thing, and mixing them up is behind many indexing problems on small practice sites. AI crawlers read the same file, and our guide on allowing or blocking AI crawlers explains what to allow and what to block. A sitemap lists every page, but the menu decides which ones patients and crawlers meet first, so review the navigation menu and footer for a medical practice website at the same time. The first month after a new site launches looks small and uneven, as shown in our case study of a newly launched ministry site.

What a good sitemap contains

  • Only pages that return a normal, successful response and that you want indexed: service pages, location pages, provider bios, and guides.
  • No redirected URLs, broken pages, thank-you pages, login pages, or duplicate versions of the same page.
  • Accurate last-modified dates, set only when the page content truly changed. A sitemap that claims everything changed today teaches Google to ignore the date.
  • Full, canonical URLs on the same domain and protocol, such as your https version.
  • Reference in robots.txt, using a Sitemap line, and submission in Search Console.

Most website platforms generate a sitemap for you, so the job is checking it. Open it in a browser, sample twenty URLs, and confirm they load. If you read how to read Google Search Console, the Sitemaps report will show when Google last read yours. Also confirm that every listed address is the preferred version, with a matching canonical tag, as explained in canonical tags and duplicate content on a medical practice website. The sitemap is also the fastest way to start a page inventory spreadsheet that lists every page and what it is for. A sitemap lists your pages while structured data describes them, and schema markup for a medical practice website, explained covers what that markup adds. When a page address changes, its sitemap entry has to change too, and clean URL slugs and the steps before changing one lists the full check.

What robots.txt can and cannot do

Robots.txt controls crawling, not indexing. A page you block can still appear in search results if other sites link to it, shown without a description. To keep a page out of search, leave it crawlable and add a noindex directive, or protect it behind a login. Google's documentation says robots.txt is not a way to hide a page. That matters for a practice: never treat robots.txt as protection for anything private, and never place patient information on a public URL at all. A sitemap does not replace links between pages, so read our guide on internal linking for a practice site as well. If a bad update ever takes the site down, the recovery steps in our guide to website backups, uptime monitoring and maintenance for a medical practice include re-checking the sitemap and robots file.

The most damaging mistake is a leftover 'disallow everything' rule from a staging site, which keeps Google away from the whole practice. It happens during launches and redesigns, so it belongs on your website launch checklist.

A ten-minute check

  1. 1Open yoursite.com/robots.txt and read every rule. Confirm there is no blanket disallow and no rule blocking service or location folders.
  2. 2Open your sitemap and confirm it lists your key pages and no error pages.
  3. 3In Search Console, confirm the sitemap status is successful and the discovered count roughly matches your real page count.
  4. 4Inspect one important page with the URL Inspection tool and confirm Google is allowed to crawl it.

If your site has several sections, such as a blog or separate location folders, a single sitemap or a sitemap index file both work, as long as every important page appears once. For a small practice, one clean file is easiest to maintain. Whoever updates the website should know who owns these two files, because a plugin update or a platform migration can silently overwrite them, and the fix is much easier when the change is caught within days. If the sitemap lists addresses that now fail, follow how to find and fix broken links and 404 errors. Submit the sitemap in Search Console once you have verified the site, as described in how to set up and verify Google Search Console. A page listed in the sitemap but never linked from another page is an orphan, and a monthly orphan-page and click-depth check shows how to find them.

Frequently asked questions

Do I need an XML sitemap if my site is small?

It is not strictly required, since Google can find pages through links, but it is cheap insurance. A sitemap helps Google discover new and updated pages faster, and Search Console reports on it. Most platforms create one automatically, so just verify it.

Does robots.txt keep a page out of Google?

No. It asks crawlers not to request the page, but the URL can still be listed if other sites link to it. Use a noindex directive on a crawlable page to keep it out of results, and use a login for anything private.

Should thank-you pages be in my sitemap?

Usually not. Thank-you pages exist to confirm an action and do not need to rank. Leave them out of the sitemap and consider noindex. Keep the page accessible so conversion tracking can still fire when a form is submitted. Check the file again after any launch or redesign.

How often should my sitemap update?

It should update whenever you add, remove, or significantly change a page, and most platforms do this automatically. Check that last-modified dates reflect real changes, not the date the file was generated. Check the file again after any launch or redesign.

What is the most common robots.txt mistake?

Leaving a blanket disallow rule in place from a staging or development site. It tells every crawler to stay away from the whole domain. Check the file after every launch and every redesign. Check the file again after any launch or redesign.

Sources

Keep reading

Ready to Grow Your Practice?

Primara is now accepting new independent practices nationwide. Most new engagements begin within one week.

Send Us a Message

We respond within one business day.

* Required field

We'll call to confirm your consultation.

No spam, ever. HIPAA-aware agency. We respond within one business day. For urgent inquiries, call (561) 291-2681.

Founder-LedHIPAA-AwareServing Practices Nationwide