Handbuch Suchmaschinenoptimierung

Häufige Fragen

The rel='canonical' attribute

The rel='canonical' attribute is an HTML element that enables webmasters to prevent duplicate content issues by specifying the "canonical", or "preferred", version of a web page.

For example, the same web page could be available in a web version and a print version. By using the rel='canonical' attribute in the print version, you show search engines that the web version is the version that should be found in the search results.

When should you use the rel='canonical' attribute?

The canonical attribute should only be used as a last resort. You should try to avoid duplicate content in the first place. Before adding the attribute, try the following to avoid duplicate content problems:

  • Use different CSS files to create print or mobile versions of your web pages.
  • Use 301 redirects to redirect old pages to their new versions.
  • Use the robots.txt file to hide unwanted directories from search engines.

That said, there are several pages on which you should use the rel='canonical' attribute:

  • Web pages that have URLs with session ID's.
  • Web pages that have tracking codes in the URL (for example, ad landing pages).
  • Pages that are linked with mixed case URLs.

Is there a risk?

It is very important that you use the canonical attribute correctly. If you enter the wrong URLs, this can have a negative impact on your search engine rankings.

Here are the most common rel='canonical' mistakes:

  • The canonical attribute leads to a 404 page.
  • You use the same canonical tag with the same URL on all pages of your website.
  • You put the canonical attribute in the <body> part of a web page instead of the <head> part.
  • The canonical attribute links to another website.

If you don't use the canonical attribute correctly, your website might be removed from Google. If you're not sure what you're doing, better do not use the canonical attribute at all.

Does Google always use the canonical attribute?

Google sees the rel='canonical' tag as a 'strong suggestion' that they might ignore. If the pages with the canonical URL are totally different, Google will index them anyway.

Continue with 'the robots.txt creator'.

VERWENDET VON
SEOprofiler users