---
title: Hreflang Present Outside Head
description: Ensure your hreflang attribute gets crawled by search engines by following these steps to implement it in the <head> rather than outside of it. 
---

[Knowledge Base - Resources - seoClarity ](https://www.seoclarity.net/resources/knowledgebase)

# [Hreflang Present Outside Head](https://www.seoclarity.net/resources/knowledgebase/glossary/hreflang/hreflang-present-outside)

 Written by [Suraj Lalchandani](https://www.seoclarity.net/resources/knowledgebase/author/suraj-lalchandani) | May 4, 2023

The hreflang attribute should be implemented in the <head>, not outside of it. 

If your hreflang tag isn’t where it should be, you can delete it and re-add it appropriately. 

#### Table of Contents

- - [Why This Is Important](https://www.seoclarity.net/resources/knowledgebase/glossary/hreflang/hreflang-present-outside?hs_amp=true#why-this-important)
    - [How to Update Hreflang ](https://www.seoclarity.net/resources/knowledgebase/glossary/hreflang/hreflang-present-outside?hs_amp=true#how-update-hreflang)
    - [Solving the Hreflang Issue at Scale](https://www.seoclarity.net/resources/knowledgebase/glossary/hreflang/hreflang-present-outside?hs_amp=true#solving-hreflang-issues-scale)
      
          - [How to Delete Existing Hreflang](https://www.seoclarity.net/resources/knowledgebase/glossary/hreflang/hreflang-present-outside?hs_amp=true#how-delete-existing-hreflang)
          - [How to Add Hreflang in the <head> Section](https://www.seoclarity.net/resources/knowledgebase/glossary/hreflang/hreflang-present-outside?hs_amp=true#how-add-hreflang-in-head-section)
    - [Next Steps](https://www.seoclarity.net/resources/knowledgebase/glossary/hreflang/hreflang-present-outside?hs_amp=true#next-steps)
    - [*Looking for other hreflang issues?*](https://www.seoclarity.net/resources/knowledgebase/glossary/hreflang/hreflang-present-outside?hs_amp=true#looking-other-hreflang-isssues)

## Why This Is Important

If the hreflang resides outside the <head>, it may not be crawled by search engines. This means that the attribute may not be serving the purpose you think it is.

## How to Update Hreflang 

The solution here is to ensure that hreflang attributes reside in the <head> tag on the page. 

You’ll need to delete the current hreflang and add it again in the correct location. 

To do this, you’ll need certain access permissions to your site’s code. If you don’t have those permissions, you may need to ask the engineering team to add the code to your website. 

Luckily, you can also use an [SEO execution platform](https://www.seoclarity.net/seo-automation/) to implement the change on your own — all within a matter of minutes. Here’s how.

## Solving the Hreflang Issue at Scale

Updating a page in which the Hreflang resides outside the <head> can be completed in two steps.

### How to Delete Existing Hreflang

The first step of the process is to delete the current hreflang tag(s) that exist outside the <head>. You can do that using [ClarityAutomate](https://www.seoclarity.net/seo-automation/).

1. **Select what you'd like to optimize: Code**  
   In this example, we’re looking to delete the hreflang code from the <head>, so we start by selecting “Code” in ClarityAutomate.
2. **Choose how you'd like to optimize it: Delete**  
   This is where we specify that we want to delete the current hreflang tag.
3. **XPath location: XPath of the hreflang outside the <head> that needs to be removed**  
   This is where we set the XPath of the hreflang that we want to delete. 

*That’s it! Push those changes live and the hreflang will be gone.*

### How to Add Hreflang in the <head> Section

Now that the original hreflang has been deleted, you can add it back in the correct location. 

1. **Select what you'd like to optimize: Code**  
   This is the same step as above, since we’re still dealing with hreflang and your site’s code.
2. **Choose how you'd like to optimize it: Add New**  
   In this case, we want to add new hreflang to the page.
3. **XPath location: XPath within the <head> where you would like hreflang  to be added**  
   This step ensures that you’re adding the new hreflang within the <head>.
4. **Specific Location: You can choose “Add before location” or “Add after location” depending on where you want it added**  
   You can adjust the specific location of the hreflang with ClarityAutomate.
5. **Code: The full hreflang that you would like added**  
   Lastly, enter the hreflang code. 

## Next Steps

All that’s left to do is to push your changes live. [ClarityAutomate](https://www.seoclarity.net/seo-automation/) lets you go through this entire process in a matter of minutes, so you can scale this process across your entire site. 

#### Looking for other hreflang issues?

- [Conflicting Hreflang and rel=canonical](https://www.seoclarity.net/resources/knowledgebase/conflicting-hreflang-and-canonical) 
- [Hreflang with multiple defaults](https://www.seoclarity.net/resources/knowledgebase/hreflang-with-multiple-defaults) 
- [Invalid region in the Hreflang attribute](https://www.seoclarity.net/resources/knowledgebase/invalid-region-hreflang-attribute) 
- [Invalid language in the Hreflang attribute](https://www.seoclarity.net/resources/knowledgebase/invalid-language-hreflang-attribute) 
- [Hreflang with Duplicate Language/Region Combinations](https://www.seoclarity.net/resources/knowledgebase/hreflang-with-duplicate-language/region-combinations) 
- [Hreflang Missing Language Entry](https://www.seoclarity.net/resources/knowledgebase/hreflang-missing-language-entry) 
- [Underscore Instead of Dash in Hreflang](https://www.seoclarity.net/resources/knowledgebase/underscore-instead-dash-hreflang) 
- [Empty Hreflang URL](https://www.seoclarity.net/resources/knowledgebase/empty-hreflang-url) 
- [Hreflang Not Present](https://www.seoclarity.net/resources/knowledgebase/hreflang-not-present) 
- [Hreflang URL Is Invalid](https://www.seoclarity.net/resources/knowledgebase/hreflang-url-invalid) 
- [Invalid order of Hreflang values](https://www.seoclarity.net/resources/knowledgebase/invalid-order-hreflang-values) 
- [No self-referencing Hreflang tag](https://www.seoclarity.net/resources/knowledgebase/no-self-referencing-hreflang-tag) 
- [Hreflang Using Relative links](https://www.seoclarity.net/resources/knowledgebase/hreflang-using-relative-links) 

[View full post](https://www.seoclarity.net/resources/knowledgebase/glossary/hreflang/hreflang-present-outside)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Suraj Lalchandani"
  },
  "dateModified" : "2023-05-24T16:31:38.406Z",
  "datePublished" : "2023-05-04T17:34:13Z",
  "headline" : "Hreflang Present Outside Head",
  "image" : {
    "@type" : "ImageObject",
    "height" : 601,
    "url" : "https://www.seoclarity.net/hubfs/page_hreflang_5_hreflangpresentoutsidehead.png",
    "width" : 1201
  },
  "mainEntityOfPage" : "https://www.seoclarity.net/resources/knowledgebase/glossary/hreflang/hreflang-present-outside",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60,
      "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
      "width" : 60
    },
    "name" : "Knowledge Base"
  }
}
```