January 16, 2025

Hreflang Tags 101: A Comprehensive Guide to Global SEO

If you’ve just started developing websites, or you work for a digital marketing company, you might have heard of ‘hrefang tags’ and their importance to your international strategy. If you haven’t heard of hreflang tags, the team at Wildcat Digital are here to dispel some myths, and try and provide some clarity for hreflang annotation. 

So, what are hrefang tags, what do they do, and how do they help your website reach an international audience? 

In short, hreflang tags are small snippets of annotated code placed hidden within a website’s internal structure. They inform search engines and their crawlers about the language and target audience of the content. For instance, if you offer your content in French for a French-speaking audience, hreflang tags help search engines serve this version to users in French-speaking regions.

There’s clearly quite a lot to unpack here, and we haven’t even touched upon some of the most important aspects of hreflang tag usage and implementation. So, without further ado… 

What are Hreflang Tags?

Hreflang tags are <link> elements that sit in the <head> section of web pages. They also can sit in the HTTP header, or .XML Sitemap of your website too. However, as they typically sit after the HTTP header, inside the <head> section, we will review these versions of hreflang tags in this section. 

Hreflang tags aren’t automatically generated by website platforms. For instance, with websites built in Wix, WordPress or Shopify, you have to request that the CMS builds hreflang tags for you, or download a plugin such as Polylang to do the tag insertion.

Placed in the <head> section of a webpage, hreflang tags are processed by search engines before the rest of the page is loaded. This section also contains other metadata like meta descriptions, meta pixels, and tracking codes (e.g., Google Analytics), which provide important information about the page to search engines and crawlers.

Hreflang implementation involves inserting links to alternate language or regional versions of a page within the <head>. This ensures that search engines and browsers direct users to the correct language version of a page. For example, a UK-based user might be directed to www.example.com/uk/, www.uk.example.com, or even www.example.co.uk.

This content is known as metadata, and it gives crawlers and search engines important information about the site or page before anything else is loaded. 

Hreflang tag implementation is essentially the insertion of links to other pages within this section so that search engines, browsers and crawlers can navigate to the correct language version of the page before it shows the user the original document, which wouldn’t be a regional variant suitable to them.

Let’s take a look into how these regional pages might look, and how they can be built into your site to allow for internal traffic, whilst also avoiding creating duplicate content issues in the process. 

What Does a Hreflang Tag Contain? 

<link rel=”alternate” href=”https://www.apple.com/fr/iphone” hreflang=”fr-FR”>

Above is the hreflang tag from the iPhone page of the Apple website. There’s quite a lot to take in here, so let’s break down this element into its constituent parts, and learn what each section is telling us. 

First of all, It’s a <link> element, primarily used to link external resources to the HTML document or, in this case, the webpage. The link section starts with ‘<link’ and is closed by the surrounding red ‘>’ at the end of the element. 

Next, the rel=”alternate” indicates that the linked resource is an alternate version of the current page. In this case, it points to a version of the page translated or localised for a different audience. 

‘href=”https://www.apple.com/fr/iphone/’ is the URL of the alternate resource. It points to the Apple iPhone page for France. This is indicated to us by the subfolder /fr/ within the URL. ‘fr’ is the alpha-2 country code for France in the ISO 3166-1 standard.

‘hreflang=”fr-FR”’ specifies the language and region for the alternate version, further confirming that it’s for French speakers in France. French speakers in Senegal may be given ‘fr-SN’, showing the language and location for that particular area and language. 

Contained within this snippet is something called a ‘cascading style sheet’, or CSS for short. CSS tells the browser and search engines (and us in this particular case) how the element should be displayed to the user. In this case, as it is an element contained within the <head>, we don’t want it to appear on the website itself. So this element is hidden through the CSS. 

Understanding x-default for Href Lang Tags

The ‘x-default’ value is used when a webpage does not target a specific language or region but acts as a fallback option for users. It’s useful for language selector pages and global pages without regional content.

Here’s how it might look:

<link rel=”alternate” href=”https://www.apple.com/fr/” hreflang=”x-default”>

This tag signals search engines to direct users to this page when no other hreflang matches the user’s language or location.

Hreflang vs. Canonical Tags

While hreflang tags indicate alternate versions of a page for different audiences, a canonical tag is used to specify the preferred version of a page.

For example, if you have multiple URLs with very similar content, such as:

  1. https://wildcatdigital.co.uk/page/
  2. https://wildcatdigital.co.uk/page/?ref=ad

You might use a canonical tag to tell search engines that the 1st URL is the primary version. You therefore need to insert a canonical tag to the 2nd URL, canonicalising it to the 1st.

<link rel=”canonical” href=”https://wildcatdigital.co.uk/page/”>

If hreflang tags are implemented, canonical tags must be consistent across all versions of the page to avoid confusing search engines and potentially creating redirect loops. This is because, when canonical tags and hreflang tags are incorrect, search engines may try to resolve these conflicts by redirecting between different versions.

Where To Implement HrefLang Tags

Implementing hreflang tags can be tricky depending on the functionality of your website. That said, as the hreflang tag itself needs to be located by search engines and browsers in a particular location, implementing them can be quite straightforward.

In short, there are 3 locations where hreflang tags can be implemented: 

  1. In the HTML <head> section.
  2. In the HTTP header.
  3. In an XML sitemap.

Each method is a little different and requires different tools depending on your CMS functionality, your technical ability, and other special requirements. Let’s dive into each, to see how each of the above 3 methods can help you implement href tags and market your products to an international audience. 

HTML Hreflang Tag Implementation

As detailed in our ‘What Does a Hreflang Tag Contain?’ section, hreflang tags are best placed within the <head> section of your website.

Editing the <head> section can be daunting; mistakes here can disrupt your search engine optimisation efforts. To avoid potential issues, we recommend auditing your website both before and after implementation. Always save backups of your website prior to making any changes to ensure you can quickly restore your site if necessary.

Hreflang Tag Implementation for WordPress Sites

As a digital marketing agency, we aim to provide clear signals to both users and search engines for the content we create. Our goal is to achieve this while maintaining efficiency and staying within our budgets.

For WordPress websites, we often recommend using a plugin like Polylang to help us achieve the above. Polylang simplifies the implementation of hreflang tags and helps create duplicated international pages. It’s a user-friendly and reliable tool that ensures your hreflang tags are set up correctly. If you’re using WordPress, Polylang is one of the best options for implementing hreflang tags seamlessly.

Hreflang Tags for Wix and Shopify

Implementing hreflang tags on Wix and Shopify websites can be slightly more complex due to the limitations of these platforms. However, there are various effective methods to ensure your multilingual or regional content is properly indexed by search engines:

For Wix:

For Shopify:

By using the right tools and carefully reviewing your implementation, you can optimise your site’s performance in international search results on both Wix and Shopify.

HTTP Header Implementation

Inserting hreflang tags in the HTTP header is a great way to add alternate language versions to web documents which aren’t served in HTML. Adding links with alternate language documents to HTTP headers is more immediate than adding them to HTML, as the HTTP response comes before any HTML is rendered to the client’s browser. 

First, figure out where your file lives. Locate the server where your file is hosted (e.g., Apache, nginx, etc.). From here, access your server settings. For Apache, you need to open the .htaccess file. For nginx, you’ll need to edit the configuration file for your site. Then, insert the hreflang tag in the HTTP header.

XML Sitemap HrefLang Tag  Implementation 

Let’s break down the key components of an XML sitemap and how it can be used to include annotations like hreflang and canonical tags.

First, if you are new to .xml sitemaps, you can read more with our blog What Is a Sitemap and How Do Search Engines Use Sitemaps?

For your own reference, you can also view our .XML sitemap here

An XML sitemap provides search engines with a structured list of all the pages on your website, helping them crawl and index your content more efficiently. Some information is given on this simple page to help crawlers understand the documents stored within the sitemap, including the last date that the page was modified <lastmod>, the frequency at which the page changes <changefreq>, and <priority>.

To implement the hreflang tags, we are going to add additional information to this brief list which will allow crawlers to understand that there is an alternate version of the page available for international users.

This may look like this:


<url>

  <loc>https://wildcatdigital.co.uk/fr/</loc>

  <xhtml:link rel=”alternate”  hreflang=”fr” href=”https://wildcatdigital.co.uk/fr/” />

Subdomains vs. Subfolders: Choosing the Right URL Structure

When creating multilingual or regional versions of your website, you have two main options for how you want your new URLs to appear for the user: in subdomains or subfolders.

If you are new to URL structure, then catch -up with our blog: How Do I Format a URL for SEO?

Subdomain URL Structure

Creating a separate subdomain for each language or region (e.g., fr.wildcatdigital.co.uk/blog/) is one of two possible URL structures that you might opt for when implementing hreflang tags. Subdirectory regional variations of your website have some notable advantages and disadvantages, however. 

Advantages of Subdomain Creation for Hreflang Tags:

Branding: Subdomains can be beneficial for branding and regional targeting (e.g., https://fr.wildcatdigital.co.uk/ for the French market). This site clearly exists for a French audience. 

Separate Analytics: Subdomain creation makes it easier to track traffic and performance for each region or language in Google Analytics. This means that you will have to create new properties for every regional variant of your website, however. 

SEO Benefits: Potentially better for local SEO, especially if you’re targeting specific countries. With subdomain implementation, your site is solely targeting a single location, helping it show for the regions that it targets over an international variation of a single domain (i.e. Subfolder implementation). 

Disadvantages to Subdomain Creation for Hreflang Tags:

Link Building and Domain Authority: Subdomain implementation can present issues which make it more difficult to build strong backlinks to each subdomain.

User Experience: Users may perceive subdomains as separate entities, which could negatively impact user experience.

Technical Challenges: Sometimes challenges with cookie management and cross-domain tracking are present when your business operates two separate domains.

Subfolder URL Structure

The Pros of a Subfolder for Hreflang Tags:

SEO Benefits/ Domain Authority: Subfolder URL creation is generally considered better for SEO, as all backlinks to the root domain benefit all subfolders. This is an aspect of Domain Authority, as keeping all links pointing towards the same domain is the only way to build this domain’s authority score

User Experience: It is easier for users to navigate between different language versions of the site.

Technical Simplicity: It is easier to manage and maintain a subfolder from a technical standpoint.

The Cons of a Subfolder for Hreflang Tags:

Branding: Subfolder URLs may not be as effective for regional marketing and local SEO.

Analytics: It can be tricky to track traffic and performance for each region within a single Google Analytics account. You may need an advanced knowledge of GA4 to build regional reports. 

CMS Limitations: You may prefer to blog on one CMS, and build your landing pages on another. In this case, you would work across two domains due to the lack of functionality with each. 

Choosing the Right Approach

The best choice depends on a number of factors, including:

SEO priorities: Subfolders are recommended if you wish to maintain the SEO efforts between your pages. 

Branding goals: If strong regional branding is crucial, subdomains might be a better option.

Technical resources: Consider the technical expertise available to manage and maintain the chosen structure.

As an SEO Agency, we strongly recommend the use of subfolder URL structure when implementing hreflang tags as this is the only method that helps maintain your domain authority. 

How Do Hreflang Tags Help Your SEO?

Hreflang tags help your SEO by creating duplicate URLs that are intended for an international audience, whilst not splitting your SEO efforts across similar content URLs. 

As mentioned, search engine optimisation is about creating clear signals for our content, products and services, allowing them to shine through and appear in search results. Creating many duplicate pages dilutes these efforts, causing rankings to potentially drop. 

Creating hreflang tags allows you to create these duplicate pages without dilution. Hreflang annotation helps you reach these international audiences, without any losses in your rankings. 

Validating Your Hreflang Tags

You can validate your hreflang tag implementation in a few different ways, namely via Google Search Console or a third-party checker such as Technical SEO from Dentsu.

If you have Google Search Console verified on your website, then you can check it through the ‘Enhancements’ section on the left-hand side of the screen. From here, GSC will tell you if there are any issues with your hreflang tag annotation. 

Via a third-party site like Technical SEO, you can validate both your HTML and HTTP implementations and even XML sitemap implementations quickly. You can also alter the user agent, reviewing the implementation from the perspective of Googlebot, Googlebot Smartphone, AdsBot, Bingbot etc. 

Going International with Wildcat Digital

If you want to branch your business’s website out to international audiences, and you are new to hreflang annotation, then you might need the help of a digital marketing agency. 

Here at Wildcat Digital, our team helps many burgeoning businesses reach an international audience by implementing hreflang tags across their product, category and service pages. When you work with us, our dedicated SEO account managers and PPC specialists create campaigns with your business in mind. Often, this included hreflang tags, a vital part of taking your business global. 

If you are interested in allowing our team to help map, create and implement hreflang annotation across your website, then don’t hesitate to get in touch today. 

Post by

Jon Herdman

SEO Executive

Will Hitchmough

Founder

Our founder, Will Hitchmough, worked at a number of high profile Sheffield Digital Agencies before founding Wildcat Digital in 2018. He brings an extensive knowledge of all things related to SEO, PPC and Paid Social, as well as an expert knowledge of digital strategy.

Digital Marketing can be a minefield for many businesses, with many agencies ready to take your money without knowing how to deliver results. I founded Wildcat Digital to deliver digital success to businesses with smaller budgets in a transparent way.

Chloe Robinson

Content Strategist Team Lead

With a degree in Marketing and a background in more traditional, offline marketing, Chloe joined Wildcat in 2021 after deciding to move into the digital marketing industry. She joined us as a Content Specialist and quickly moved up the ranks, becoming a Content Strategist and later an SEO Team Leader.

Outside of work, Chloe is an avid creative. If she’s not knitting, you’ll likely find her behind a sewing machine or in the kitchen trying (and often failing!) to make sourdough.

Paul Pennington

SEO Account Director

Paul has a strong background in SEO, having previously founded and ran a successful eCommerce business, as well as running a personal blog that achieves an average of 17K users per month. Paul’s knowledge of SEO is extensive, with a strong emphasis on client handling and technical SEO.

Outside of work, Paul enjoys spending time with his family and staying active with weight lifting and combat sports.

Nadea van der Merwe

Head of Operations

Nadea joined Wildcat in 2021 and has since overhauled the way we work. She has a background in various administrative, operations and HR roles, which gave her the experience and skills needed to lead and organise a growing business. 

Outside of work, Nadea loves anything that keeps her active, but she especially enjoys hiking, camping and mountain biking.

Molly Sturgeon

Senior SEO Account Manager

With a background in sales, Molly is a natural Account Manager, brilliantly handling any issues that come her way. Having joined us as a Digital Marketing Executive, and working part-time through her final year of University, Molly is a shining example of how hard work pays off. She is now an SEO Account Manager with a particular interest in Content and Client Management. 

In her spare time, Molly loves to get out in nature, hiking and exploring the Peak District. She also loves cooking and likes to unwind with a bit of yoga.

Libby Oldale

PPC Team Leader

Libby joined Wildcat in 2021 as our first PPC hire. With a degree in Digital Media Production, a Master’s in Digital Media Management and previous experience in Social Media Management, Libby hit the ground running and has since climbed the ranks to Senior PPC Account Manager and has a particular interest in the eCommerce sector.

Outside of work, Libby likes gaming, and cooking and likes to keep active by lifting weights.

Jasmine Savery

SEO Account Manager

Jasmine joined Wildcat in 2022 with a strong background in SEO and Account Management. At the time, she was finishing up a Level 4 Apprenticeship in Digital Marketing from the Chartered Institute of Marketing, and has since worked her way up to SEO Account Manager. Jasmine excels at content writing and promotion, and particularly enjoys finding creative ways to join the dots on multi-channel campaigns.

In her spare time, Jasmine volunteers at a charity, helping combat loneliness & social isolation experienced by older neighbours. Outside of Wildcat, she owns a catering company, Savery Grazing, creating delicious grazing tables & platters for a range of events. She also loves skiing and exploring the Peak District.

Braden Godley

Senior PPC Executive

Prior to joining Wildcat, Braden founded and ran his own Social Media Management agency where he gained valuable skills in growing brands’ online presence, which has since proven invaluable in his role at Wildcat. 

Outside of work, Braden is a big football fan, regularly travelling to Pride Park to support Derby County. He also enjoys watching and playing snooker, hiking in the Peak District, and attending air and car shows.

Jon Herdman

Senior SEO Executive

After spending ten years managing businesses, restaurants, cafes and event spaces across Sheffield, Jon decided to change careers and joined Wildcat as an SEO Executive in 2022. He especially enjoys the client management side of the job, helping them to understand digital marketing and ways in which they can build their business’s presence online. 

Outside of work, Jon likes to keep fit with running, badminton and football, and also loves music. 

Rachel Davies

Senior SEO Executive

Rachel joined us as a graduate, having recently graduated from Sheffield University with a degree in English Literature. Since joining, Rachel has proven herself to be a Content Queen, and particularly enjoys getting stuck into projects that allow her to explore her creative side. 

Outside of work, Rachel enjoys a wide range of hobbies, including rugby, singing, reading, and spending time with her family and three labradors.

Dariusz Baczyk

Team Lead & Technical SEO Account Manager

With a degree in Computer Science and SEO experience dating back to 2017, Dariusz has a wide range of SEO skills and knowledge. His specialist knowledge of Technical SEO has firmly landed him the title of Wildcat’s Technical Wizard, and he has recently taken on the responsibility of Team Leader for the Panthers Team.

In his spare time, Dariusz loves hiking, experimenting and trying new coffees and loves learning new things. He is currently learning more about CRO and AI and how this could benefit our clients.

Jamie Stowe

Senior SEO Account Manager

With a degree in Film and TV production, and a varied career history, Jamie made the move to marketing with a Masters degree in Digital Media Management. He has since worked in SEO at Agencies across Sheffield, before joining Wildcat and working his way up to SEO Account Manager. Jamie has a particular interest in backlinks and Digital PR and has recently gained a client a valuable backlink from Forbes!

In his spare time, Jamie is an avid foodie and loves trying new restaurants and cuisines. He also loves to travel and spent a year travelling to Australia after university.

Andy Blanchard

Senior SEO Executive

Andy joined Wildcat in 2023 after starting his digital marketing career in-house for a local Sheffield company. Since joining, he has developed a strong interest in Technical SEO and has strong skills in Account Management. 

Outside of work, Andy loves music and plays in a couple of bands. He also enjoys rock climbing, cycling, photography and good food.

Siena Russell

Client Success Coordinator

Siena joined us in 2023 with a background in sales and digital marketing. She leads on client relationships across the company, ensuring that our customers are happy throughout their journey with us, from their initial consultation through to onboarding and beyond. 

Outside of work, Siena enjoys travelling and getting stuck into the local culture. She likes to make the most of her experiences and particularly enjoys watching sunrises and sunsets from beautiful locations around the world.

Thea Chapman

SEO Account Manager

Thea has a wealth of experience in SEO, having previously worked for other Digital Marketing Agencies in Sheffield. She has a particular interest and skills in Technical SEO, but is more than willing to get stuck in and give anything a go. 

Outside of work, Thea spends most of her time with her children, but also loves reading, photography and gardening. 

Tom Brookes

PPC Executive

Before joining Wildcat, Tom worked across different industries, building skills in sales and customer service. He later developed a passion for digital marketing whilst working on personal marketing projects and freelance ventures, and gained numerous certifications in PPC and Social Media. 

Outside of work, Tom enjoys staying active by going to the gym and hiking. He also loves travelling and motorbiking.

Rich Ayre

Head of Growth

Rich joined us in May 2024 to head up our growth team. With years of experience helping other agencies to grow, Rich joins us at an exciting time as Wildcat is working on a five-year plan to become one of the biggest agencies in the UK.

Outside of work, Rich is a father to three children, which keeps him very busy! He’s also recently started running again to keep fit and loves a bit of DIY.

Kezia Humphries

SEO Executive

Kezia joined us in July 2024 after completing a CIM Certificate in Digital Marketing and gaining experience in Content SEO at another Sheffield agency.

In her spare time, Kezia loves to get outdoors, bouldering, hiking and travelling.

Amy Varley

SEO Executive

Amy joined Wildcat in 2024 with a background in journalism, having worked as a News Editor and Editor-in-Chief at The Sheffield Tab. She is naturally interested in Content SEO and research, so will no doubt prove to be a content power-house.

In her spare time, Amy loves watching crime shows, listening to music and hanging out with her dog, Eddie!

Masilda Hysi

PPC Account Manager

Masilda joined the Wildcat team in October 2024 with over seven years of experience in digital marketing. She specialises in Google Ads, but is also certified in Google Analytics, YouTube Ads, Google Ads for Ecommerce and Apple Search Ads. She has extensive expertise in performance marketing, display advertising, online lead generation and market planning.

In her free time, Masilda likes staying active, cooking, trying new restaurants and exploring new places.

 

More blogs.

View all

How Important are Images for SEO?

January 14, 2025

We all know the importance of images when it comes to surfing the web. You can quickly acquire information and…

Andy Blanchard

SEO

How Important Are Reviews For SEO?

January 14, 2025

Knowing your business is delivering the right services and support is key to a long-lasting relationship with your customers. Online…

Amy Varley

Knowledge Hub
SEO

Link Building: How To Find Unlinked Brand Mentions

January 14, 2025

Tracking down unlinked brand mentions is a quick and effective way to gain new backlinks, without the legwork of a…

Jasmine Savery

SEO