Jump to content

SELF-CANONICAL on all pages


Recommended Posts

  • 2 weeks later...

Self - referencing canonical tags will be added automatically by using yoast SEO. Use the advance section on each post or page.

Code looks like this: <link rel=“canonical” href=“https://example.com/sample-page/” />

link rel=“canonical”: Master canonical version for the page

href=“https://example.com/sample-page/”: canonical version

Link to comment
Share on other sites

  • 1 month later...

An alternative to using canonical tags is to implement a rel="canonical" HTTP header.

This is the implementation approach that you need to take to specify a canonical URL for PDFs or other non-HTML documents.

You need to be able to access your site's .htaccess file to implement this and can specify a canonical URL using the following code:

<Files "file-to-canonicalize.pdf">
 Header add Link "< http://www.website.com/canonical-page/>; rel=\"canonical\""

Edited by atupuxi (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...