Share on linkedin
Share on twitter
Share on facebook

Developing the Weglot hreflang checker tool

Share on linkedin
Share on twitter
Share on facebook

Since the day I wrote my first line of code, I loved it. I never became a professional developer but I still enjoy learning new things to do with coding. Enhancing my coding skills naturally helps me a lot with my job as the Head of Technical Support at Weglot as every day I work on any technical problems our users might experience.

My role is to help our users install and use our translation solutionx in their own environment because everybody works differently and has their own habits. Since I interact with users a lot while resolving their questions and problems, I’m able to gather very valuable insights from them. I then share this information about how users feel using our product with the development and marketing teams so that we can make improvements and make their life easier. Weglot is constantly changing and evolving from this, meaning each release should offer a better or more complete version of the product!

For all these reasons, the idea of developing the hreflang checker and helping users increase their business came naturally and was a motivating challenge for me. Hreflang tag related questions are something we come across quite a lot at Weglot’s support team. So when Weglot co-founders, Augustin and Rémy, asked me to work on a side project, I knew it was exactly what I wanted to work on. I also saw it as a great opportunity to enhance my coding skills!

Why a “hreflang checker”?

For those of you who don’t know, hreflang tags are a technical solution that tells Google which language you’re using on a specific page, so it can take you to the right language version of that page.

For example, let’s say a French user is searching for your website and your website is available in both English and French. Hreflang tags are used to tell Google to display the French version of your website to this user in search results. Sounds pretty simple, right? 

Well actually hreflang tags are quite complicated to implement. And don’t just take my word for it. Even Google’s very own SEO expert, John Mueller once said that “hreflang is one of the most complex aspects of SEO (if not the most complex one)”

That’s why it’s quite useful that Weglot adds hreflang tags for your website automatically. Or you might be a badass so adding them yourself is no problem. Either way, I thought creating a tool that checks hreflang tags and makes sure that they are implemented correctly would make life a little bit easier for our users.

The development process

Developing the hreflang checker was quite a journey. Like I said, I’m not a professional developer so it pushed me to work extra hard. At the start of the project I had a good general understanding about hreflang tags and their importance for multilingual websites.

But to really understand the subject I started with some deep research into Google’s resources on hreflang tags, multilingual websites and SEO. As I discovered more about the topic, I became increasingly dedicated to the project. But the challenging part was to “translate” all this information to regular PHP code.

My strategy was to first visit a website as a Google bot and gather all the hreflang tags in that website source. This way I managed to create a checklist with all the elements Google takes into account, such as the original source and the translated sources having the same number of hreflang tags, hreflang tags’ format, and so on.

Each new element added to the checklist was an exciting improvement but at the same time it made me nervous because my code didn’t always work with these newly added elements. For example for the Canonical URL, I had to factorise back the main function of my code. But thankfully, I managed to make it all work in the end. So after four months of hard work, I was finally able to release a Beta version of the hreflang checker tool.

The Beta testing lasted for two months and I was pleasantly surprised at the fact that I only received a few comments on tiny issues from my colleagues. Although I worked a lot on this project, I’m still a newbie in coding and anything can go wrong. However, it looked like the tool was working perfectly.

Sure, it was a challenging process and I annoyed some colleagues once (or twice :P) along the way by constantly asking them for explanations regarding the coding notion. But they’ve always been incredibly helpful offering their valuable advice and support. Thanks to them and to this project, I learned and improved a lot. 

So what started as a side project to help me enhance my coding skills ended up being something that I’m really proud of today. It’s a very useful tool that can detect conflicts and make sure that hreflang tags and canonical URLs are respecting Google best practices regarding SEO.

Display of the Hreflang Checker Tool

What’s next?

As it’s still the first version of the project, there are a lot of exciting improvements that can be made. For example, detecting the language used in the source of each alternative version of a website could be the next thing that I’ll work on. I guess you’ll find out soon!

Finally, I’d like to say that this tool is made for you and your business to thrive worldwide. So I sincerely hope that it will be useful and you’ll enjoy using it as much as I enjoyed creating it. 

Try the Weglot hreflang checker tool out for yourself – as ever, let us know any feedback via support@weglot.com

About the author
READY TO GET STARTED?
The best way to understand the power of Weglot is to see it for yourself. Get your website multilingual live in minutes.
Cookies settings
We use cookies to collect and analyze information on site performance and usage, to provide social media features and to enhance and customize content and advertisements. Learn more with our Privacy policy
Necessary cookies

Some cookies are required to provide core functionality. The website won’t function properly without these cookies and they are enabled by default and cannot be disabled.

Non-necessary Cookie Settings

Any cookies that may not be particularly necessary for the website to function and is used specifically to remember preferences or to help us improve our website by collecting and reporting information on its usage.

We use cookies to collect and analyse information on site performance and usage, to provide social media features and to enhance and customize content and advertisements. Learn more with our Privacy policy
Subscribe to our newsletter

Stay up to date with the latest Weglot news and tips!