What is robots.txt?
A robots.txt file is a plain text file at the root of a website (yoursite.com/robots.txt) that tells search engine and AI crawlers which pages or folders they may and may not visit. Well-behaved bots like Googlebot check it before crawling, but it's only a request, so it can't protect private content.
The file is made of simple rules grouped by crawler. A line like "User-agent: Googlebot" names the bot, "Disallow: /admin/" keeps it out of a folder, and a "Sitemap:" line points crawlers to your XML sitemap. The file governs crawling, and crawling and indexing are separate steps: a blocked page can still appear in search results if other sites link to it, so a noindex tag is the right tool for keeping a page out of Google.
robots.txt is also where you set policy for AI crawlers, such as OpenAI's GPTBot, PerplexityBot and Google-Extended. Blocking them keeps your content out of some AI training or answers, and it can also reduce how often AI tools cite your business, so the choice should be deliberate. It's often mentioned alongside llms.txt, a newer proposed file that gives AI tools a curated guide to a site's most useful content.
For example, a Melbourne law firm relaunches its website and enquiries from search fall away within weeks. The cause turns out to be a single "Disallow: /" line copied from the staging site, which told every search engine to stop crawling the whole site. Removing it and resubmitting the sitemap in Google Search Console starts the recovery, and checking robots.txt becomes part of the firm's launch checklist. Technical checks like this are part of how our SEO agency in Melbourne works.
Related questions
What is robots.txt disallowing?
A Disallow rule in robots.txt tells a named crawler not to visit a particular page, folder or URL pattern, for example "Disallow: /checkout/". To see what your own site disallows, open yoursite.com/robots.txt and read the Disallow lines under each User-agent. A line reading "Disallow: /" on its own blocks the entire site for that crawler, which is a common launch mistake.
Where is robots.txt found?
The robots.txt file always sits at the root of the domain, so you'll find it by adding /robots.txt to the homepage address, such as example.com.au/robots.txt. Crawlers only look in that exact location, and each subdomain needs its own file. If nothing loads there, the site doesn't have one.
How do you create a robots.txt file?
Create a plain text file named robots.txt, write your rules with User-agent, Disallow and Allow lines plus a Sitemap line, and upload it to the root of your domain. Platforms such as Shopify and Webflow, and SEO plugins for WordPress, generate one automatically and let you edit it in their settings. Test it afterwards with the robots.txt report in Google Search Console.
Should I have a robots.txt file?
Yes, most websites should have one, even if it only points to the sitemap and allows everything. Without a file, crawlers assume they can visit every page, which is fine for many small sites. It becomes important when you need to keep crawlers out of areas like internal search results, cart pages or staging copies.
How can I generate a robots.txt file?
You can generate a robots.txt file with a free online generator, through your CMS or SEO plugin, or by writing the few lines yourself in any text editor. Generators help get the syntax right, though you should check the output before uploading, since one wrong Disallow line can block your whole site. Many website platforms create a sensible default file for you.
Is robots.txt still used?
Yes, robots.txt is still used by every major search engine, and it was formalised as an internet standard (RFC 9309) in 2022. It has become more important with AI, since many AI companies publish crawler names that site owners can allow or block there. It relies on crawlers choosing to follow it, and some don't.

