Choose the right control to keep a page out of results or to consolidate duplicate pages.
Type your website's address into a browser, add /robots.txt to the end, and press enter. If your site has one, you'll see a short plain text file. Keep it open while you read. It is one of three settings that decide how Google treats your pages, and the three are easy to mix up.
The three are robots.txt, noindex and canonical tags. Their names sound similar, but each does a different job. Robots.txt controls crawling. Noindex keeps a page out of Google's results. A canonical tag tells Google which of several near-identical pages you prefer. Mixing them up is a common cause of lost search traffic.
Robots.txt is a plain text file at the root of a site, at the domain followed by /robots.txt. It tells crawlers which parts of the site they may fetch. A line such as "Disallow: /admin/" asks crawlers not to visit pages under the /admin/ folder. Anyone can view a site's robots.txt by typing that address into a browser.
Robots.txt controls whether a page is crawled. It has no say over whether the page is indexed. Google's documentation says a page blocked by robots.txt can still be indexed and shown in results if other pages link to it. In that case Google knows the address exists but cannot read the page, so the result may show the address with little or no description.
Use robots.txt to stop crawlers spending time on sections with no search value, such as internal search results or endless filtered versions of a product list. It is the wrong tool for hiding a page from Google's results.
Noindex is a rule telling Google not to include a page in its index. It can sit in a meta tag in the page's code or in the page's HTTP response header. Many website builders show it as a per-page setting, worded something like "hide this page from search engines".
Google only sees a noindex rule if it can crawl the page. If a page is blocked in robots.txt and also has noindex, Googlebot never fetches it and never sees the noindex. The page can then still appear in results through links. Google's documentation states that for noindex to work, the page must not be blocked by robots.txt. When you noindex a page, leave it crawlable.
Good uses for noindex are thank-you pages after a form, internal staff pages, thin tag or archive pages that a website builder creates automatically, and test pages that must stay live. For Priya, the confirmation page parents see after booking a trial class is a sensible noindex candidate.
Lesson 1.1 explained that Google groups duplicate or near-duplicate pages and picks one as the canonical, the version it may show. Duplicates are more common than people think. The same page may be reachable with and without "www", with a tracking code added to the address, or through two different menu paths. An online shop may show one product at several addresses, one for each colour.
A canonical tag is a line in a page's code that points to the preferred address and tells Google which version you prefer. To fix duplicates, put a canonical tag on each version, all pointing to one main address.
Google treats the canonical tag as a strong hint, and it can still overrule it. If other signals disagree, for example the sitemap lists a different version or your internal links all point elsewhere, Google may choose another version. Keep the signals consistent: link internally to the canonical version, list it in the sitemap, and point canonical tags at it.
A canonical tag is the wrong tool for keeping a page out of results, because the content still gets indexed under the preferred address.
To choose between the three controls, start with what you want to happen:
If you want a page kept out of results, use noindex and leave the page crawlable, with no robots.txt block on it. If you want Google to show one version of several near-identical pages, put a canonical tag on each version pointing to the preferred one. If you want crawlers to skip a section with no search value, and you don't mind its addresses being known, use robots.txt.
A staging site is a private copy of a site where changes are tested before they go live. Designers often block staging sites from search, either with a blanket robots.txt rule disallowing the whole site or with a noindex on every page. Both are sensible on staging. Trouble starts when the site is copied to the live address with those settings still switched on. A blanket "Disallow: /" asks every crawler to stay away from everything. A site-wide noindex removes every page from results over time. Neither setting is visible to someone browsing the site, so it can go unnoticed for months.
Take a small accounting firm in Singapore (an invented example) that spent months building a new website. The designer built it on a test address first and ticked a "discourage search engines" box to keep Google away from the unfinished version. The site went live with the box still ticked. Three months later, the firm noticed that enquiries from Google had almost completely stopped. The cause was a site-wide noindex, and robots.txt played no part.
After any launch, redesign or platform move, check within the first day. Open robots.txt and look for a blanket "Disallow: /", then check the noindex setting on a few pages.
Go back to the robots.txt you opened at the start and read each Disallow line. Then pick three important pages on your site, ones you want people to find through Google, and view each one. Check whether any carry a noindex rule, and whether any carry a canonical tag pointing somewhere unexpected. Your website builder's SEO settings will show both. So will the URL Inspection tool in Google Search Console. In the activity below, note anything that blocks a page you want found.
Open your site's robots.txt, check three key pages for noindex and canonical tags, and write down anything that blocks a page you want people to find.
Junxiong-WFG Organisation is an authorised representative of AIA Financial Advisers Private Limited (Reg. No. 201715016G).