hreflang tags how to add?

General questions regarding the use of languages in Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
vjcyber1
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Tue Jun 26, 2018 12:55 pm

hreflang tags how to add?

Post by vjcyber1 » Sat Jul 07, 2018 8:36 am

Hi!

My website is https://www.vjcyber.com :
When i go to google webmaster tools of my joomla site it says

Your site has no hreflang tags.
Google uses hreflang tags to match the user's language preference to the right variation of your pages.

My website is only in English but in google webmaster my preferred search country in United Arab Emirates as website is for that country!

How to add this tag?

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: hreflang tags how to add?

Post by infograf768 » Sat Jul 07, 2018 9:12 am

The language used in the page is the important matter.
hreflang is always used in conjunction with rel="alternate" and is useless if your site is monolanguage.

What you can do to help Google is to use the languagecode system plugin and propose there en-AE to replace en-GB in the rendered page.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

vjcyber1
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Tue Jun 26, 2018 12:55 pm

Re: hreflang tags how to add?

Post by vjcyber1 » Sat Jul 07, 2018 9:36 am

Thanks for your reply, you mean i have to install that plugin but my major concern is how it will impact my SEO is it will make redirects and duplicate content issue or confuse the search engine?

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: hreflang tags how to add?

Post by infograf768 » Sun Jul 08, 2018 8:42 am

You do not have to install the plugin. It is included in core. Just enable it and set the correct param.
No redirect at all, no duplicate.
It just tells search engines witch language/country code the site is aimed to.
Basically, it will just replace
<html lang="en-gb" dir="ltr"
by
<html lang="en-ae" dir="ltr"
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

vjcyber1
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Tue Jun 26, 2018 12:55 pm

Re: hreflang tags how to add?

Post by vjcyber1 » Fri Jul 13, 2018 6:28 am

done

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: hreflang tags how to add?

Post by infograf768 » Fri Jul 13, 2018 6:50 am

Does not look like
I still see in source

Code: Select all

<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" lang="en-gb" dir="ltr"
	  class='com_content view-featured itemid-101 home j36 mm-hover'>
You may have to clean all your caches.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

vjcyber1
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Tue Jun 26, 2018 12:55 pm

Re: hreflang tags how to add?

Post by vjcyber1 » Mon Jul 23, 2018 6:25 am

Well i did in language code plugin in , enable it and paste the language en-AE but nothing is happening.

Sorry i forgot to check the source code i was expecting its done!


Locked

Return to “Language - Joomla! 3.x”