Technical SEO: sitemap, robots.txt and canonical

What a sitemap, robots.txt, canonical and response codes are, how they are checked and which errors are most common.
Technical SEO is the work that lets search engines find, read and remember your pages without errors. If your pages are good but Google can't reach them or sees them as duplicates, the content doesn't help. This article explains in plain language what a sitemap, robots.txt, canonical addresses, redirects and response codes are, how to check them, and which mistakes show up most often on small sites.
How a search engine looks at your site
A search engine robot starts from known addresses, reads the page and follows the links. This is called crawling. Then it decides which pages to keep in its index and how to show them. If a page hasn't been crawled, it can't be indexed. If it has been crawled but not indexed, Google knows it but doesn't consider it useful enough, or considers it a duplicate. Technical SEO removes the causes of the first kind and some of the second.
The difference between crawling and indexing matters because they have different remedies. With crawling, you fix access and links. With indexing, you improve the page, its uniqueness and the internal links pointing to it.
The sitemap (sitemap.xml)
The sitemap is an XML file listing the addresses you want indexed, usually at /sitemap.xml. It doesn't guarantee indexing, but it helps the search engine find new and changed pages. Only pages that return code 200, can be indexed and are canonical belong in it. Don't include login pages, the cart, thank-you pages, search results or old redirected addresses.
If you use WordPress, the sitemap is generated by an SEO plugin. In a custom system, the code generates it and it updates when something changes. Submit its address in Google Search Console and Bing Webmaster Tools. Then watch the report: how many addresses were submitted and how many are indexed. A big gap is a reason to open the Pages report and look at the causes. How to read Search Console.
The robots.txt file
Robots.txt is a text file at /robots.txt that tells robots where they shouldn't go. For example: Disallow: /admin. It is not protection: anyone can open the file and see what you have hidden, and not all robots obey it. If a page should not be public, protect it with a login, not with robots.txt.
The most expensive mistake is Disallow: / for the whole site. It often gets left over from a test environment, and the site disappears from search engines after launch. Check robots.txt after every move or new release. Another slip is blocking the folders with styles and scripts, because then the robot can't "see" the page the way a person does. Also add the Sitemap line to robots.txt to point to your sitemap.
The canonical address
The same page is often reachable at several addresses: with and without www, with http and https, with tracking parameters, with and without a trailing slash. To a person it is one page; to a search engine it is several. A canonical tag in the head says which address is the main one: link rel="canonical" href="https://webnova.work/uslugi-i-ceni". That way rankings and signals are gathered in one place.
Rules: every page points to itself as canonical, unless it is an intentional duplicate of another. The address is absolute and uses https. Don't set a canonical to a page that returns an error or is redirected. Don't set canonical against noindex: if one says "index" and the other "don't index", the search engine chooses for itself.
Redirects and response codes
Every page returns a code. 200 means everything is fine. 301 is a permanent redirect to another address and is used when an address changes. 302 is temporary. 404 means the page doesn't exist, and 410 that it has been removed. 5xx are server errors. The problems are: redirect chains (A to B to C), loops, redirecting all old pages to the home page, 404s on pages that have links from outside, and pages that return 200 but show "Page not found" (a so-called soft 404).
When you change addresses, make an "old address, new address" table and set up a 301 for each one. What gets kept in a shop migration.
HTTPS, www and address versions
The site should be reachable only over https and in only one version: with www or without. All other versions redirect with a 301 to the main one. Check the four combinations (http and https, with and without www) and make sure each one leads to the same address with a single redirect. The certificate must be valid and renew automatically. An expired certificate shows visitors a scary warning and often means a lost sale.
Also check that the page doesn't load resources over http, because the browser blocks them and shows a "not secure" connection.
Speed and the mobile version
A slow site loses both visitors and rankings. The main measurements are LCP (how quickly the largest element appears), INP (how quickly it responds to a tap) and CLS (how much the page shifts while loading). If the site is slow, look at the size of the images, the number of scripts and the quality of the hosting. Core Web Vitals for a small site. Check the mobile version too, because Google crawls sites primarily as a mobile device.
What to check on an ordinary day
Open /robots.txt and /sitemap.xml and check that they load. Look in Search Console at the Pages report and at manual actions. Run a crawl of the site with a program that lists the response code, title and canonical for every page, and look for 404s and chains. Check that new pages are in the sitemap. Do this once a month, and after any major change to the site, the same day.
What we offer
Technical SEO Start is €149 and includes a sitemap, robots.txt, canonical and basic technical checks. Audit Standard for up to 30 URLs is €119, and Pro for up to 100 URLs is €149. Core Web Vitals is from €149. Prices include VAT. We do not guarantee positions or a number of visitors. You receive a list of the things checked, the changes made and those that need a decision from you. See Services and prices or write via form.
How to read the Pages report in Search Console
The report shows how many pages are indexed and why others are not. The most common reasons are: "Discovered, currently not indexed" (Google knows about the page but hasn't decided to show it), "Crawled, currently not indexed" (the page was read but didn't turn out useful or unique enough), "Duplicate without user-selected canonical", "Page with redirect", "Blocked by robots.txt" and "Not found (404)". Each reason has a different remedy: the first needs more internal links and content, the third a correct canonical, the fourth a check of the sitemap.
Don't panic about every page in the not-indexed list. Many of them are there by design: login, cart, old addresses. What matters is the pages you want to be visible that aren't.
The tool for checking a single address
Search Console has a tool for inspecting a single address. You enter the address and see whether it is in Google, when it was last crawled, which canonical Google chose and what it sees when it crawls. If an important page has changed, you can request indexing, but don't do it in bulk and don't expect an instant result. If the canonical chosen by Google differs from yours, the search engine has decided another page is more suitable, and you need to find out why.
Pages that should not be indexed
Not every page is meant for a search engine. Don't index login pages, the cart, the order, the thank-you page, internal search results, customer accounts and test addresses. For these, set a robots meta tag with the value noindex, and for private pages add a login too. Important: for the search engine to see noindex, it must be able to crawl the page, so don't also block the same page in robots.txt.
Take care of filter and sorting pages in the shop too. If a single filter creates thousands of addresses with different parameters, the search engine spends its crawling on them. Decide which combinations are useful to people (for example category plus colour) and close off the rest.
Pagination and duplicate content
List pages (page 2, 3, 4 of the blog or a category) have their own canonical, not one pointing to the first page, if they contain different products or articles. If two pages have almost the same text, merge them or clearly differentiate them. Duplicates often come from tags and archives in a blog plugin. If they add no value, exclude them from the index.
The most common mistakes on small sites
A noindex left over from development. A test version of the site that is public and indexed. A sitemap containing redirected addresses. Two canonical tags that contradict each other. A missing sitemap and no link to it in robots.txt. A certificate error after renewal. Resources over http on an https page. All of this can be found in about an hour by crawling and looking at the two files, and it is fixed quickly if you know where to look.
Related guides
- SEO content and articles for a small website
- SEO audit: what it includes and how to read it
- Website measurement: Analytics and Search Console
- On-page SEO: page title, description and H1
Frequently asked questions
Does a small website need a sitemap?
It isn't mandatory if the site is small and well linked, but it is useful and easy to make. It helps you see which pages are indexed.
Can robots.txt hide a page from Google?
Not reliably. A page blocked in robots.txt can still appear in results if other pages link to it. To hide a page, use noindex or a login.
Which is worse: a 404 or a redirect to the home page?
Redirecting everything to the home page is often treated as a soft 404. It is better to redirect to the closest page by meaning, or to leave a 404 when there isn't one.
Want more people to find you?
An SEO audit of up to 30 URLs with a 30-day plan for €119, incl. VAT and with a clear scope.
Learn moreMore from the blog
- How much SEO costs: price and what it includes
- My site doesn't show up on Google: 7 reasons in order of checking
- What is SEO optimisation: explained without jargon
Technical SEO Start · €149.00 incl. VAT. You contact us from this link, we confirm the scope and the price in writing before we start, and clients follow everything in their dashboard.
