How can I add hreflangs to specific CMS blog pages in Webflow without creating issues with multiple head tags?

TL;DR
  • Access the Webflow Dashboard, open the project and CMS Template page to add hreflang tags.
  • Open the Custom Code section via the template settings and insert hreflang tags within the “Inside Head Tag” area.

Adding hreflang tags to specific CMS blog pages in Webflow requires careful attention to placement within the page settings to avoid creating issues like multiple head tags. Here’s a concise guide to help you:

1. Access CMS Template Page

  • Go to your Webflow Dashboard, and open the project you are working on.
  • Navigate to the CMS collection for your blog.
  • Open the CMS Template page where you want to add the hreflang tags.

2. Open Custom Code Section

  • Click on the settings icon for the CMS Template (gear icon in the Pages panel).
  • Scroll down to the “Custom Code” section within the template settings.

3. Add hreflang Tags in Head Code

  • Add your hreflang tags inside the “Inside Head Tag” section.

  

  Here’s a sample format for your hreflang tag:

  • <link rel="alternate" href="URL for language version" hreflang="language code" />

4. Conditional Visibility (Optional)

  • To ensure tags only appear on specific blog pages, consider adding conditional statements if you're familiar with Liquid or similar templating languages. Note, this isn't directly supported by Webflow and may require exporting the code for a workaround.

Summary

To add hreflang tags to specific CMS pages in Webflow, edit the CMS template, and place the tags in the “Inside Head Tag” section of the custom code area, carefully ensuring the correct placement to avoid multiple head tags. Adjust use cases based on your specific language and regional requirements.

Rate this answer

Other Webflow Questions