In the world of SEO, canonical tags play a crucial role in helping search engines understand which version of a webpage should be considered the "real" one. However, there may be instances where you want to set a non-canonical link in your Webflow collection pages. Whether you're republishing articles from publishing partners or need to block certain content from being indexed, Webflow provides the flexibility to customize your canonical tags.
Understanding Canonical Tags and Duplicate Content
Before we dive into setting a non-canonical link in Webflow, let's briefly explore what canonical tags are and why they are important. Search engines like Google can sometimes get confused by duplicate content, which occurs when multiple pages have the same content but different URLs. This confusion can impact your SEO efforts, as search engines penalize duplicate content to prevent content proliferation across various websites.
Canonical tags come to the rescue by allowing you to declare the "canonical" page, which is the preferred version among duplicates. By specifying the canonical URL, you help search engines understand which page to prioritize and avoid penalizing your website for duplicate content.
For a comprehensive understanding of canonical tags and their impact on SEO, check out Moz's article on the topic.
Setting Up Global Canonical Tags in Webflow
Webflow provides a convenient way to set global canonical tags for your entire website. To do this, you'll need to navigate to your project's SEO settings:
Go to Project settings.
Select the SEO tab.
Locate the Global Canonical Tag option.
Enter your site's base URL, such as https://mywebsite.com.
Save your changes.
By setting the global canonical tag, Webflow will automatically populate canonical tags for each page on your site using the combination of your base URL and the unique URL slug for each page.
Customizing Canonical Tags in Webflow Collection Pages
Now, let's delve into setting non-canonical links specifically for Webflow collection pages. Suppose you're a news publisher and occasionally republish articles from publishing partners. In such cases, you want to ensure that Google recognizes the original publisher and doesn't penalize you for duplicate content.
Webflow allows you to disable the global canonical tag and add manual canonical tags using custom code for your static pages and collection page templates. Here's how you can achieve this:
Disable the Global Canonical SEO tag in your Webflow project's SEO settings.
Add manual canonical tags to each static page and collection page template using page settings.
Specify the canonical URL in the Custom code section of each page or template.
To ensure consistency and avoid confusion, always use the https://www. version of your domain in the canonical tag on each page. This approach helps Google understand the canonical version and prevents dilution across multiple domains.
For your CMS articles pages, you can use conditional code to determine the canonical URL. If a URL is present in the Canonical collection field, use that as the canonical URL. Otherwise, set the URL of the current page as the canonical URL. Here's an example code snippet:
<script>
const curl = "CANONICAL URL";
if (curl != "") {
link = document.createElement('link');
link.href = '{{wf {"path":"canonical-url","type":"Link"} }}';
link.rel = 'canonical';
document.getElementsByTagName('head')[0].appendChild(link);
}
</script>
By implementing this code, you can dynamically set the canonical URL based on the presence of a URL in the canonical collection field.
Remember to republish your site after making these changes to ensure they take effect.
Conclusion
Setting non-canonical links in Webflow collection pages provides you with the flexibility to handle various scenarios, such as republishing articles or blocking specific content from search engine indexing. By understanding canonical tags and leveraging Webflow's customization options, you can optimize your SEO efforts and ensure search engines accurately interpret your website's content.
Webflow empowers you to take control of your website's indexing and canonicalization, allowing you to tailor your web presence according to your unique requirements. So go ahead and explore the possibilities, experiment with different settings, and optimize your website's SEO performance with Webflow's flexible features. Happy optimizing!
Comments