My blogger blog cannot create canonical tags for my blog posts with a custom domain. How can I do to create canonical tags?

What is canonical tag,How To Fix “Duplicate without user-selected canonical” in blogspot
Tâm

Creating canonical tags for a Blogger blog with a custom domain can be a bit tricky since Blogger doesn't provide a straightforward option for this in its default settings. However, you can manually add canonical tags to your blog posts using the following steps:

1. Access Your Blog's HTML:Go to your Blogger dashboard.Click on 'Theme' on the left sidebar.Near the top right, click on 'Edit HTML'.

2. Manual Insertion of Canonical Tags:Within the HTML editor, you'll need to locate the <head> section.You can manually insert the canonical link tag in this section for each post. The tag format is <link href="URL-of-your-post" rel="canonical"></link>.Note that you'll need to replace "URL-of-your-post" with the actual URL of the blog post.,

3. Use Conditional Tags for Automation:To make the process less manual, use Blogger’s conditional tags to automate canonical URLs for each post.Insert something like:html

Check for the line <b:include data='blog' name='all-head-content'/> or <b:includable id='JetAll-head-content'> in the header using the search feature.

4. Code:
<b:if cond='data:blog.url == data:blog.canonicalHomepageUrl'> <link expr:href='data:blog.url' rel='canonical'/> <b:else/> <link expr:href='data:blog.canonicalUrl' rel='canonical'/> </b:if>

This code checks if the current page is the homepage or a post page and sets the canonical URL accordingly.

5. add the above line to the theme and Save Changes:After adding the code, save the changes.

You can check if the canonical URL is working properly or not by checking the source code of the webpage Ctrl+U.

6. Test Your Implementation:Use tools like Google’s Rich Results Test or view the page source of your blog posts to ensure the canonical tags are correctly implemented.

Remember that manually editing your blog’s HTML requires caution. It's a good idea to backup your current theme before making changes. If you're not comfortable editing HTML, you might consider seeking assistance from someone with web development experience.

Rate This Article

Thanks for reading: My blogger blog cannot create canonical tags for my blog posts with a custom domain. How can I do to create canonical tags?, Sorry, my English is bad:)

Getting Info...

Đăng nhận xét

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.