If you're searching for Add Hreflang Tags in WordPress Without Plugin. then believe me You've come to the right place.
Read till the end and solve your problem without a plugin. We will not use Like Polylang tag, HREFLANG Tags Lite WordPress Plugin.
Is your blog consisting of a particular region?
The hreflang tag will then help your website to improve SEO for those areas that are spoken mainly in those languages.
If you still do not know the exact idea of why the Hreflang tag is necessary,
Then let me give an example,
In India, Hindi is a national language, a large number of people speak Hindi. Many other languages are spoken in India, such as Bengali, Gujarati, Tamil, Telugu.
so you have to be clear about what your blog's target audition is and understand which language they speak.
It is important for search engines to show that your site's language content is not reused and to provide guidelines on the pages that you want to list for alternate languages in different countries.
If you want to show the page is for users in more than one country or region, you can use multiple hreflangs tag on one page also.
So Now you understand that you have to write in which language and which target audience is your right?
Now it comes to know that How are we going to tell Google Search Engine that our blog is in which language and our targeted audience is?
The answer is simple we use the hreflang tag. So here again the question is what does Hreflang mean? Don't worry that I'll explain, let's see …
Before we going further. must Watch Video for Getting Depth of hreflang tag.
What Is Hreflang Tag?
According to Wikipedia, the hreflang tag is the HTML meta element. Hreflang defines the language and possible regional requirements of the text.
WordPress is available in over 60 languages. So you've got to add the Hreflang tag. It tells Google in which language your blog is posted.
For example, If one page of your blog post is in A language and the other page is in B language, Google will get that information from your blog. When the hreflang tag has been added.
Below is a sample code,
<link” rel=”alternate” hreflang=”en-us” href=”https://example.com/” />
What is ISO Language and Region Codes
The hreflang tag is a mixture of the code of the language and the code of the country. for example, En-us for English and the United States.
How To Generate A Hreflang Tag For Your Blog/Website
Generate the hreflang tag for your blog here. Click Here
- Enter your Blog Address.
- Select Language of your blog
- Select Your Targeted Country
- If you want to Generate HTML code then Tik only it
- If you want to Generate XML Sitemap then Tik only it
- Finally, Press the Button for getting your code and Copy these code or Save
Where To Put The Code For Hreflang Tag
It is easiest to put the hreflang attribute in the HTTP header, or the sitemap.
How To Add Hreflang Tags In WordPress Without WordPress Plugin
I'm going to tell you two methods here that you can use any of them.
They're both fully working. You can test it in the hreflang testing tool after adding it.
Method 1: Add hreflang Tag in WordPress Using Header.php
in this method, We need to edit the WordPress header.php file.
Log into your WordPress dashboard and select Appearance → Theme Editor From this view, you can access your Theme Files.
On the right hand side you will see all the files in your template. Find the file titled, Theme Header or header.php. This is the only file you will need to edit.
In the image below, you will see that I put my generated hreflang Tag under the.
So the 1st method is complete. Your hreflang Tag has been inserted into your blog in a perfect way.
Note: If you Don't Find the header.php file or any Doubt or confusion about it. If you think the header.php file update will impact my site so that you can skip this process and use Directly the 2nd method.
Method 2: Add Hreflang Tags in WordPress Using Insert Headers and Footers
in this method, We're going to use the Insert Headers and Footers Plugin. Typically we use this plugin to add a script to our header or body field.
If this plugin is working in your WordPress, it's cool, if not, to download it from here.
It's safe and doesn't influence the speed of your blog. Its plugin is also going to be helpful in the future.
Now, Go to your WordPress dashboard and select Settings → Insert Headers and Footers
You will find like below image. past your hreflang Tag into Scripts in Header Box.
Bottom Line : Add Hreflang Tags in WordPress Without Plugin
I hope this post will help you find out How to Add Hreflang Tags in WordPress without Install WordPress plugin.
Both methods will work for you, but remember to use any one of them.
If you liked this post, please share it because I wrote this post to help you after doing a lot of research and experimenting with myself.