How to fix hreflang conflict issues?

In this article, we explained hreflang conflict issues and its solution.

What is hreflang?

hreflang is a tag attribute tells google search engine which language you are using on a specific page and serve results based on the searcher’s country and language preferences.

Code Sample:

<link rel=”alternate” href=”” hreflang=”fr” />
<link rel=”alternate” href=”” hreflang=”Nl” />


Where the Hreflang Attribute Goes?

  1. using link elements in the – HTML hreflang link elements in your <head>
  2. using HTTP headers – The second method of implementing hreflang is through HTTP headers. HTTP headers are for all your PDFs and other non-HTML content you might want to optimize.
  3. or using an XML sitemap -The third option to implement hreflang is using XML sitemap markup. It uses the xhtml:link attribute in XML sitemaps to add the annotation to every URL.


Very common issue, we unaware about it:

– If we are not following trailing slash it will create hreflang conflict error when you analysis your website SEO.

Ex: and

Both URL’s are looking the same but we missed trailing slash on first one. So we should use trailing slash in all url to avoid hreflang conflict issue.


Ex: and

Both links are looking the same, but we missed www. on first one. So we should add www in all url to avoid hreflang conflict issue.


Above two hreflang conflict issues fixed by using .htaccess file as like as follows

    # Basic WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # Force https 
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    #Force www
    RewriteCond %{HTTP_HOST} !^$ [NC]
    RewriteRule ^(.*)$$1 [L,R=301]
Want Most Modern and Affordable WordPress Themes and Templates here Get Here

Leave a Reply

Forgot Password