[ad_1]

“That is Canon! ”

You may have heard this phrase used to describe creative works that are faithful to an original work or a fictional world.

If you are familiar with the specification, then you can have a good understanding of normalization and its impact on web pages.

Here, let us explore what normalization is, why it is important for SEO, and how to add tags to your own website.

What is normalization?

Canonicalizes the original or preferred page, which helps to merge duplicate pages for crawling.

Without naming canonical URLs, web crawlers can crawl and index multiple versions of your web pages. Google says It will reduce the frequency of crawling non-canonical pages to reduce the crawl load on your website.

Crawling low-quality, repetitive pages less frequently means that more important pages can be crawled first.

Okay, but why do we deliberately have duplicate content? Hmm…Have you ever published your content on your website and Medium? Or, maybe after the guest post, you can also put a version of the blog post on your website.

For this, you should refer to the original version as the canonical URL. The canonical URL can refer to different domains-which means the canonical can be on another website.

Even if you don’t actively create duplicate pages for cross-channel promotion, duplication will happen naturally, because Different parts of the URL. Does your website use a secure protocol, such as HTTPS? Then, you may have the HTTP and HTTPS versions of the web page.

The same is true for www and non-www. Does your website use trailing slashes? If your website does not always redirect to the preferred version of your page (safe or not, www or not, and trailing slash or not), duplication may occur.

Even if you force the preferred version through redirects, the query parameters used to track visits or filter page views may look like separate URLs for crawlers. Declaring the canonical URL instructs web crawlers to ignore query parameters or other versions of the URL.

What is a canonical URL?

External Resources element Define the relationship between the current page and other resources. Use the “rel” attribute on the tag to indicate the type of relationship.Some common Link type Including “prev” and “next” for paging, “style sheet”, and of course “canonical”.

The tag uses the “rel=” noopener” target=”_blank” href” attribute to set the URL used as the activity page specification. Although these are intended as links to external resources, the canonical URL can be “self-referencing”, which means it is the exact version of the current page.Using self-referencing specifications can help reduce unnecessary crawling of non-preferred version pages, as long as you always use absolute URLs as “rel=”noopener” target=”_blank” href” value.

In Google Search Console, you can use Check URL tool Understand what Google considers to be a canonical URL, even if you haven’t set it yet. Even if you declare a canonical URL, Google will sometimes choose a different URL, which is listed as the “Canonical URL selected by Google.” Therefore, canonicalization does not guarantee that Google will select your preferred version or that other versions will not be indexed.

How to add canonical tags

Add canonical tags in HTML documents

As mentioned before, you can use Element to set your canonical URL. Link elements are self-closing tags. The “rel” and “rel=” noopener” target=”_blank” href” attributes are required.

To add a canonical link to the HTML document, please Element to add element. Make sure the “rel” attribute value is set to “canonical”. Remember to use the absolute URL of the preferred URL as the value of the “rel=” noopener” target=”_blank” href” attribute.

<頭>

https://www.mypreferredwebaddress.com/canonical-url“>

Add canonical tags in HubSpot

In HubSpot, you can set your canonical URL in a single page or post settings under advanced options. Read more about canonical URL setting options.

Add canonical tags in WordPress

Common WordPress SEO plugins, including Yoast and RankMath, simplify the setting of standardized URLs, especially for multiple pages. If you are a bit more advanced and don’t want to add another plugin, you can also use WordPress Hooks to update the canonical URL.

1. Use the get_canonical_url hook.

Filter WordPress hook Allows you to modify data while WordPress is executing. The add_filter() function accepts at least two parameters, a tag and a callback function.The tag will be the hook, in this case get_canonical_url.

The callback function parameter will be the name of the function you created to return the canonical URL. The callback function can use conditional statements to match specific posts. See this stack exchange answer example.

In this example, the “wpse_302620_canonical_url” callback function uses an if statement to return the new specification when the post ID passed as the function parameter matches a specific post. With this in mind, this solution seems to be a fix for some posts or post types, but may not scale well. To apply to multiple pages, using plug-ins may be the best option.

2. Use Yoast plug-in.

If you use Yoast, you can apply canonical URLs to posts, pages, and taxonomy. Select the type of content you want to edit from the menu on the left, and then “Edit” a single content. In the Yoast SEO meta box, switch the “Advanced” section. Add your preferred URL in the “Canonical URL” field and save it. Learn more about Yoast’s canonical URL settings.

3. Use the ranking math plugin.

When editing your specific page or post, select the “Advanced” tab on Rank Math. Add your preferred URL in the “Canonical URL” field and save it. Learn more about setting canonical URLs in Rank Math.

SEO Starter Pack

[ad_2]

Source link

Leave a Reply