We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47401
    • 295 Posts
    Hi, I need to impliment google href lang on one of our modx sites. This requires 1 modx install to be able to view from 2 different domain names. This also requires the header to show 2 lines in the header

    <link rel="alternate" hreflang="x-default" href="http://www.domain-name.com/[[~[[*id]]]]">
    <link rel="alternate" hreflang="en-gb" href="http://www.domain-name.co.uk/[[~[[*id]]]]">

    when I issue this on the home page, the *id shows as the domain name again, which shows http://www.domain-name.com/http://www.domain-name.com

    also google analytics code needs to change for each domain name, and the footer needs to slightly change for each domain.

    i have looked into this and found that I will be needing if statements with snippets/chinks, but not too sure how to do this.

    please can somebody advise?
      • 47401
      • 295 Posts
      page content for all pages, on both domains needs to stay the same