Skip to content
BENIBIX Learn

Canonical URLs and Redirects

Level 4 · The technical layer

When the same page lives at several addresses, the engine has to pick one. How a canonical tag and a 301 redirect tell it which one is real.

Course contentsLesson 9 of 15

After this lesson you can

  • Spot duplicate content on a site
  • Set a canonical URL on a copy
  • Use a 301 redirect when a page moves

11 mincovers 3 glossary entries

Worth reading first: Robots.txt and XML Sitemaps

How to tell the engine which copy is the real one

Duplicate content is the same page, or nearly the same, at more than one web address. The engine then has to guess which one to show, and the links pointing at it are split. Two tools fix this. A canonical URL names the main copy. A 301 redirect sends visitors and engines from an old address to a new one, for good.

Most duplicates are made by accident. The same page can load with and without www, with a tracking tag on the end, or in two product categories. To a person they look the same. To an engine, each address is a separate page.

Duplicate content is rarely a penalty. The engine just picks one copy to show and leaves out the rest. The trouble is that it may pick the wrong one, and the links that point at the other copies help less.

A canonical URL is set with a short tag in the page's code. It sits on each copy and points at the main one. It says this is a copy, the real page is over there. Engines treat it as a strong hint, not an order, so the copies should really match.

A 301 redirect is a firm move. When someone visits the old address, the site sends them straight to the new one. Engines pass most of the old page's trust to the new address. Use it when a page moves for good, or when two pages merge into one.

Pick the tool by asking if people still need the copy. A page to print, or a product listed in two places, should stay. Give it a canonical tag. An old page nobody needs should go, so redirect it.

The common mistake is moving a site to new addresses with no redirects. Every link from other sites now leads to an error page. The trust built over years is lost, and the traffic falls overnight.

html
<link rel="canonical" href="https://example.com/wide-fit-hiking-boots">
The canonical tag, placed on every copy of the page. Each copy points to the one address the engine should show.
A canonical tag is a hint that keeps the copy alive. A 301 redirect is a firm move that retires the old address.

Worked example

A blog moves and keeps its readers

A food blog moves 400 posts from a date in the address to plain slugs. A friend's blog once did the same with no redirects, and lost 70 in 100 of its visits.

This blog maps every old address to its new one with a 301 redirect. Visits dip for three weeks, then return to where they were.

The words for this lesson3

Check yourself

An old page has been replaced by a new one for good. What should you do?

Finished this lesson?

Marking it complete also marks its 3 glossary entries learned, which updates your roadmap and your saved page. 0 are already marked.