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:)