Permalink
Switch branches/tags
19-upgrade RescueTime-master add-build-signals add-call-to-theme-js admin-icon agj/add-local-dev-docker agj/eslint-repair agj/remove-symlink-serving agj/ssh-add-key agj/test-rel agj/update-translations api-v2-docs auto-import azure backport-style badge-v2 better-search-logging blendify/new_ga break-out-core-urls-views build-pdf-ret-val builder-standards chirathr-webhook_notifications_url_size com-py3-compat davidfischer/cloudflare-ssl-saas davidfischer/document-api-v2 davidfischer/jquery-2432-backport davidfischer/prioritize-sidebar-ads davidfischer/remove-bower davidfischer/storage-epubs-pdfs-zips decoupling-theme-org dont-set-build-state-on-exit embed-integration eric-search-upgrade front-end-standardization gold gthank-master hotfix-confpy-path hotfix-docker-build-bug hotfix-release hotfix-virtualenv-no-downlaod hotfix-virtualenv-no-download hotfix/docker-313-relcorp hotfix/docker-313 hotfix/featureflag-mkdocs-theme hotfix/featureflag-remove-migration hotfix/multipart-api-command hotifx-frontpage-list hotifx-search-linking humitos/admin/crud-env-variables humitos/api/v3 humitos/builds/notify-old-endpoints humitos/clean/fabric-function humitos/django/compatibility humitos/integrations/handle-error-codes humitos/projects/skip humitos/resolver/username-regex humitos/ssh/management humitos/sshkeys/cryptography humitos/template/override-versions humitos/tests/api humitos/vcs/show-links intersphinx-modeling js-theme-bundle logging-cleanup master migrate-to-autoapi more-gsoc no-sphinx-build-subprocess pr/4577 privacy-backends privacy-filtering programming-language-support project-container-settings project-feature-flip-apiv2 py2-compat py3 rate-limit-builds refactor-builder rel relcorp release/2.5.2 remove-default-role remove-drf-serializer remove-unused-reqs revert-1568-haystack_upgrade revert-search rtd2 santos/implement-extend-install-option search-reapply search-rel search_upgrade simple-symlink-serving spam stale-project-delete-updates symlink-serving team-project-import test-36 theme-0.6.2 theme-version-to-0.4.x token-access tools tox-dependencies upgrade-celery upgrade-sphinx user-dashboard version-tab
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
48 lines (30 sloc) 1.6 KB

Canonical URLs

Canonical URLs allow people to have consistent page URLs for domains. This is mainly useful for search engines, so that they can send people to the correct page.

Read the Docs uses these in two ways:

  • We point all versions of your docs at the "latest" version as canonical
  • We point at the user specified canonical URL, generally a custom domain for your docs.

Example

Fabric hosts their docs on Read the Docs. They mostly use their own domain for them http://docs.fabfile.org. This means that Google will index both http://fabric-docs.readthedocs.io and http://docs.fabfile.org for their documentation.

Fabric will want to set http://docs.fabfile.org as their canonical URL. This means that when Google indexes http://fabric-docs.readthedocs.io, it will know that it should really point at http://docs.fabfile.org.

Enabling

You can set the canonical URL for your project in the Project Admin page. Check your Domains tab for the domains that we know about.

Implementation

If you look at the source code for documentation built after you set your canonical URL, you should see a bit of HTML like this:

<link rel="canonical" href="http://pip.readthedocs.io/en/latest/installing.html">

Links

This is a good explanation of the usage of canonical URLs in search engines:

http://www.mattcutts.com/blog/seo-advice-url-canonicalization/

This is a good explanation for why canonical pages are good for SEO:

http://moz.com/blog/canonical-url-tag-the-most-important-advancement-in-seo-practices-since-sitemaps