On this page
What this issue is
A robots.txt file sits at the root of your site (for example https://www.example.com/robots.txt). It tells crawlers which paths they may fetch. It can also hold a Sitemap: line, which tells any crawler where your XML sitemap is.
This issue means that line is missing. Your sitemap may exist and work fine. It is just not announced in robots.txt. The directive is part of the sitemaps protocol and is read by Google, Bing and other crawlers.
Why it costs you leads or sales
The impact is low, and it is indirect. A sitemap helps crawlers find new and updated pages, such as landing pages, product pages and booking pages. If a crawler does not know where the sitemap is, it relies on links and on whatever you submitted in Search Console or Bing Webmaster Tools.
The risk is highest for new sites, sites with weak internal links, and crawlers you never submitted to, including smaller search engines and some AI crawlers. A page that is slow to be discovered is slow to bring in visitors. The robots.txt line is a cheap safety net.
- Crawler visitsFetches /robots.txt
- No Sitemap lineNo pointer to the sitemap
- Relies on linksDeep or new pages found late
- Slower indexingNew landing pages appear later
A crawler reads robots.txt first. Without the pointer it has to find pages through links alone.
How to check if your site has it
Open the file
Go to
https://yourdomain.com/robots.txtin a browser. Check the exact version of your site that people use (with or without www).Look for a Sitemap line
Search the page (Ctrl+F or Cmd+F) for
Sitemap:. It is not case sensitive, and it can be anywhere in the file.Check the URL in the line
It must be a full URL starting with https://, on your live domain, and it must open in the browser.
Check from the command line (optional)
Run
curl -s https://yourdomain.com/robots.txt | grep -i sitemap. No output means there is no line.
How to fix it
First find your real sitemap address. Common ones are /sitemap.xml, /sitemap_index.xml (Yoast) and /sitemap.xml on Shopify and Wix. Open it in a browser to be sure it loads. Then add the line to robots.txt.
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
Sitemap: https://www.example.com/sitemap_index.xmlUse the full URL, not a relative path like /sitemap.xml. The line is independent of any User-agent group, so it can go at the top or bottom. You can list more than one Sitemap: line if you have several sitemaps.
Check what already writes robots.txt
WordPress creates a virtual robots.txt. Yoast SEO and Rank Math usually add the Sitemap line themselves. If yours is missing, confirm that the plugin's XML sitemap feature is switched on.
Edit it with your SEO plugin
In Yoast SEO go to Tools > File editor. In Rank Math go to General Settings > Edit robots.txt. Add the Sitemap line and save.
Watch for a physical file
If a real robots.txt file exists in the site root, it overrides the virtual one. Edit that file instead, or delete it if you want the plugin to manage it.
Know the default
Shopify generates robots.txt and normally includes the Sitemap line for /sitemap.xml automatically.
If it is missing, use the template
Go to Online Store > Themes > Edit code > Add a new template > robots (this creates robots.txt.liquid). Keep the default loop and make sure the sitemap line is output.
Save and re-check
Open /robots.txt on your store domain to confirm the line appears.
Turn on the sitemap
Go to Site settings > SEO and enable Auto-generate sitemap. Publish the site.
Edit robots.txt
On the same SEO tab, find the robots.txt box and add
Sitemap: https://www.example.com/sitemap.xmlusing your own domain. Save and publish.
Know the default
Wix creates a sitemap at /sitemap.xml and normally lists it in robots.txt.
If you need to edit it
Go to Settings > SEO Settings (or Marketing & SEO > SEO Tools) > Robots.txt Editor, add the Sitemap line and save. Wix may require a premium plan or advanced SEO tools for this.
Know the limits
Squarespace generates both /sitemap.xml and robots.txt for you, and robots.txt is not editable. It normally already includes the Sitemap line.
If the line is missing
Check that the domain you tested is your primary domain, not a temporary one. If it is still missing on the primary domain, contact Squarespace support. You can still submit the sitemap in Search Console.
Edit the file
Open robots.txt in your web root and add the Sitemap line with the full https URL.
If it is generated by your app
Add the line in the route or template that outputs robots.txt, then deploy. Make sure the domain comes from your production config, not a staging value.
Check caching
If a CDN serves robots.txt, purge its cache so the new version shows.
How to confirm it's fixed
/robots.txton the live domain shows aSitemap:line- The URL is absolute, uses https and matches your preferred domain (www or non-www)
- The sitemap URL opens in a browser and returns valid XML, not a 404 or a redirect chain
- Google Search Console > Settings > robots.txt report shows the latest fetch with no errors
- Search Console > Sitemaps shows your sitemap with a Success status
How to prevent it happening again
Robots.txt often gets overwritten during a redesign, a migration, a plugin swap or a theme change. Staging settings also sometimes get copied to the live site.
- Add robots.txt and sitemap to your launch and migration checklist
- Keep a copy of your approved robots.txt in version control or in a shared document
- Re-check robots.txt after changing SEO plugins, themes or hosting
- Check it again whenever your domain or www setting changes
- Set a monthly reminder to open /robots.txt and the sitemap
How FunnelGuard handles this
FunnelGuard does not check this yet. A missing Sitemap line in robots.txt is a possible future check, but today it is not monitored.
What FunnelGuard does do is run your real customer journeys (lead forms, checkouts, booking and chat buttons) on a schedule, check the tracking hits sent to ad and analytics platforms, and confirm test leads reach your inbox and CRM. That covers conversions, not search crawling.
To watch for this issue yourself, use the monthly reminder above, or use Google Search Console (the robots.txt report and the Sitemaps report) and Bing Webmaster Tools. A site crawler such as Screaming Frog can also flag it. The free FunnelGuard read-only website audit is another way to get a general look at your site.
Before
- Only User-agent and Disallow rules
- No pointer to the sitemap
- Crawlers rely on links and manual submissions
After
- One absolute Sitemap: line with https
- Any crawler that reads robots.txt sees the sitemap
- Easy to verify in a browser
Questions people ask
Do I need to add my sitemap to robots.txt?
It is not required, but it is recommended. The Sitemap line is a standard way to tell every crawler where your sitemap is, without a separate submission to each search engine. It costs one line and carries no risk when the URL is correct.
How do I add a sitemap to robots.txt?
Open your robots.txt file and add a line like Sitemap: https://www.example.com/sitemap.xml using your real full URL. Save it, then load yourdomain.com/robots.txt in a browser to confirm the line appears. On platforms like Shopify, Wix and Squarespace the line is usually added for you.
Where should the Sitemap line go in robots.txt?
Anywhere in the file. It does not belong to a User-agent group, so top or bottom both work. Most people put it at the end, on its own line, with a blank line before it.
Can I use a relative URL for the sitemap in robots.txt?
No. Use the full absolute URL, including https:// and the domain. A path like /sitemap.xml may be ignored by crawlers.
Can I list more than one sitemap in robots.txt?
Yes. Add one Sitemap: line per file, each with a full URL. If you use a sitemap index, you can list just the index, since it points to the child sitemaps.
Why is my sitemap not in robots.txt on WordPress?
Your SEO plugin may have its sitemap feature turned off, or a physical robots.txt file may be overriding the virtual one that WordPress and plugins generate. Turn on the sitemap in Yoast or Rank Math, or edit the physical file directly.
Is submitting the sitemap in Search Console enough?
It works for Google, but it does not help crawlers you have not submitted to. The robots.txt line covers any crawler that reads the file. Doing both is the safest option.
Does FunnelGuard check for a missing Sitemap line in robots.txt?
No, not yet. It is a possible future check. For now, check robots.txt by hand, or use Search Console, Bing Webmaster Tools or a site crawler.
Related issues
- SEO-099No XML sitemapFix guide
- SEO-101Sitemap not submitted in Search Console / Bing WebmasterFix guide
- SEO-102Sitemap returns 404 or 5xxFix guide
- SEO-106Sitemap lists staging or wrong-domain URLsFix guide
- SEO-107Sitemap lists http URLs on an https siteFix guide
- SEO-113Plugin generates duplicate sitemaps (Yoast plus Rank Math)Fix guide