Hreflang tags are little code snippets on a web page that allow Google (or other search engines) to see what language a particular page has been written in, what geographic location it is intended for, the alternate language options for the page, and how it relates to other pages on the site. For example, a page with
hreflang="en-FR" would be written in English for France. This is helpful for search engine purposes as it makes for better site visibility as well as a better user experience for users who can find the web page they need in a preferred language.
The hreflang functionality added to DXM WordPress allows for a non-technical, non-coder post-creator to add tags to pages and posts simply and quickly.
- Enable SEO hreflang application by browsing to My Sites | Network Admin | Sharing.
- Click Sharing.
- Scroll down to SEO hreflang application.
- Check the checkbox next to Check this to apply the site language as hreflang attribute on all shared posts/pages.
Every subsite attached to the main site will be listed.
- If your master site is publicly available and you want to reference this as the “default” page, check the checkbox next to Check this to apply “x-default” as hreflang attribute to the master page/post.
Note: If you are using an approach where your content derives from one site which is only used for Content storing purposes and not as a public site, do not check the checkbox for Check this to apply "x-default" as hreflang attribute to the master page/post. This will prevent search engines from indexing that site
Apply your hreflang tags to a Post
- Browse to any subsite and create or edit a post. The hreflang tags will be applied to newly created posts or posts that are re-shared after this functionality has been activated.
- Scroll down to the Sharing module.
- Select the sites to apply the post to.
All hreflang tags are unique, if one has been applied to a site, the same tag cannot be applied again, but that tag can be applied to a different site.
- If it has not yet been applied, click Enable to apply it, select the appropriate site, then click Confirm.
- After selecting sites and tags, use the dropdown arrow next to Bulk Actions to select Share. The share icons will turn green if sharing is successful; this may take a minute.
If you detach a site after sharing, and it has no hreflang tag applied, no change is made to the site.
If you detach a site which does have a hreflang tag applied, you are given the option to preserve it while detaching.
Hreflang tags and Translations
If Translations have already been applied to a post, this is indicated in the Hreflang column and the translation language will override the hreflang selection.
Note: If hreflang is applied to a shared site which subsequently uses a translation language, the hreflang tag used will be that of the translation language defined in the Translations module.