
This tutorial follows Google Search Central's robots.txt documentation and Blogger Help (checked November 2026). A wrong robots.txt can block your whole blog from Google, so read every step before you change anything.
Blogger creates a robots.txt file for your blog automatically, and for most blogs that default works fine. Blogger also lets you replace it with a custom robots.txt. Used carefully, this can keep crawlers away from low-value URLs; used carelessly, it can stop Google from crawling your posts entirely.
This guide explains what robots.txt does, when you should (and shouldn't) customize it on Blogger, a safe template, and how to test the result.
What robots.txt Does (and Doesn't Do)
Google describes robots.txt as a file that tells search engine crawlers which URLs they can access on your site, used mainly to avoid overloading a site with requests. It is not a way to keep a page out of Google (Google Search Central: Introduction to robots.txt).
That distinction matters:
- robots.txt controls crawling: whether Googlebot may fetch a URL.
- Robots meta tags (noindex) control indexing: whether a page appears in search results.
If you block a page in robots.txt, Google can't see a noindex tag on it, and the URL can still appear in results if other pages link to it. To keep a page out of search, use noindex, not robots.txt.
Blogger's Default robots.txt
You can see your current file by adding /robots.txt to your blog address, for example https://www.yourblog.com/robots.txt. On a typical Blogger blog, the default looks similar to this:
User-agent: Mediapartners-Google
Disallow:
User-agent: *
Disallow: /search
Allow: /
Sitemap: https://www.yourblog.com/sitemap.xml
What each line does:
User-agent: Mediapartners-Googlewith an emptyDisallow:lets the AdSense crawler access everything, so it can match relevant ads.User-agent: *applies the following rules to all other crawlers.Disallow: /searchblocks Blogger's search and label result pages (such as/search/label/...), which are lists of posts rather than unique content.Allow: /allows everything else, including your posts and pages.Sitemap:tells crawlers where your sitemap is.
Always check your own file rather than assuming it matches this example.
Should You Use a Custom robots.txt?
For most Blogger blogs, no change is needed. Consider a custom file only if you have a specific reason, such as:
- Adding your static pages sitemap alongside the posts sitemap.
- Blocking a specific crawler you don't want accessing your site.
- Keeping crawlers away from a particular URL pattern that wastes crawl activity.
Don't customize it just because a tutorial said every blog "must" have one.
A Safe Custom robots.txt Template for Blogger
This template keeps Blogger's sensible defaults and adds the pages sitemap. Replace www.yourblog.com with your own domain exactly as it appears in your browser.
User-agent: Mediapartners-Google
Disallow:
User-agent: *
Disallow: /search
Allow: /
Sitemap: https://www.yourblog.com/sitemap.xml
Sitemap: https://www.yourblog.com/sitemap-pages.xml
Lines you should never add
Disallow: /underUser-agent: *: blocks your entire blog.Disallow: /20: on Blogger, this would block every post URL (they start with the year, like/2026/).Disallow: /p/: blocks your static pages, including About, Contact, and Privacy Policy, which AdSense reviewers look for.- Blocking CSS, JavaScript, or image files that Google needs to render your pages.
Step-by-Step: Set Up Custom robots.txt in Blogger
- Save your current file. Open
yourblog.com/robots.txtand copy the contents into a text file as a backup. - Open settings. In the Blogger dashboard, click Settings and scroll to Crawlers and indexing.
- Enable custom robots.txt. Turn on Enable custom robots.txt. Blogger Help explains that this text is used instead of the default robots.txt.
- Paste your rules. Click Custom robots.txt, paste the template with your domain, and save.
- Check the live file. Reload
yourblog.com/robots.txtand confirm it shows exactly what you entered.
To undo the change, switch Enable custom robots.txt off. Blogger goes back to its default file.
Custom Robots Header Tags (the Indexing Side)
In the same Crawlers and indexing section, Blogger offers Enable custom robots header tags, with separate settings for the home page, archive and search pages, and posts and pages. Blogger Help also explains how to set "No index" on an individual post from the post editor.
A common, conservative setup:
- Home page: all (index and follow).
- Archive and search pages: noindex, so date archives and label lists don't compete with your posts.
- Posts and pages: all.
If you are unsure, leave these off. Incorrect header tags can noindex your posts.
How to Test Your robots.txt
- In Google Search Console, open Settings → robots.txt to see the version Google fetched and any errors.
- Use the URL Inspection tool on one post URL and confirm crawling is allowed.
- Check the Pages report over the next weeks for "Blocked by robots.txt" warnings on URLs that should be indexed.
Custom Domains: One Extra Check
Robots.txt applies only to the exact host it's served on. If you moved your blog to a custom domain (see how to add a custom domain to Blogger), make sure your Sitemap lines use the custom domain, including www if your blog uses it, not the old blogspot.com address.
FAQ
Do I need a custom robots.txt on Blogger?
Usually not. Blogger's default works for most blogs. Customize only for a specific reason.
Why does Blogger block /search?
Search and label pages are lists of existing posts. Blocking them keeps crawlers focused on your actual articles.
Will robots.txt remove a page from Google?
No. Use a noindex tag to keep a page out of search results. Blocking it in robots.txt can actually stop Google from seeing the noindex.
Should I block AI crawlers?
That is a personal choice. Some AI companies publish user-agent names you can block in robots.txt. Check each company's official documentation for the correct name, and don't block Googlebot by mistake.
How long until Google sees my new robots.txt?
Google refreshes its cached copy periodically. You can request a recrawl from the robots.txt report in Search Console.
Conclusion
On Blogger, robots.txt is a small file with a big impact. Keep Blogger's defaults unless you have a clear reason to change them, never block /, post URLs, or /p/ pages, and use noindex (not robots.txt) to keep pages out of results. Back up first, test in Search Console after, and your blog stays safely crawlable. For the content side of SEO, continue with our free keyword research guide.
Comments
Post a Comment