Categories

System Admin
DXM
Documents
Data

Links

Hreflang Tags

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.

Enabling hreflang

  1. Enable SEO hreflang application by browsing to My Sites | Network Admin | Sharing.
  2. Click Sharing.
  1. Scroll down to SEO hreflang application.
  2. 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.

  1. 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
  1. For each site, type in a corresponding language or language-region pair, e.g. en-GB, fr-FR. The 2-letter language and country codes can be copied from the ISO standards lists.
  2. Click Save.

Apply your hreflang tags to a Post

  1. 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.
  2. Scroll down to the Sharing module.
  1. Select the sites to apply the post to.
The sharing feature will apply the hreflang tags to the shared versions automatically. It will pick the top item from the list to apply the hreflang tag to. If the hreflang tag has already been applied to the site, it will display with a green checkmark.

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.

  1. If it has not yet been applied, click Enable to apply it, select the appropriate site, then click Confirm.

  1. 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.