Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client was unsure if WPML inserts Hreflang tags directly into the raw HTML or via JavaScript, as some tags seemed to only appear after rendering when using crawling software.
Solution:
We insert Hreflang tags directly into the HTML using the

wp_head

hook from WordPress.

If this solution does not apply to your situation because it might be outdated or not relevant to your case, we recommend opening a new support ticket. We also highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please contact us in the WPML support forum.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Mihai Apetrei 1 year, 4 months ago.

Assisted by: Mihai Apetrei.

Author Posts
February 27, 2024 at 10:45 am #15348527

emmaR-4

Hi, I know WPML takes care of adding Hreflang tags on pages automatically.
I wonder if Hreflang tags are inserted to raw HTML directly or they are inserted via JavaScript where those tags only appear after rendering?

Because I can see some tags only appear after rendering when I use screamingFrog software to crawl the site (See image). Please clarify.

Capture.PNG
February 27, 2024 at 2:03 pm #15349466

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

They are inserted into HTML directly, via the "wp_head" hook from WordPress.

Mihai Apetrei