Search code examples
dnsmultiple-domainsbusiness-catalyst

Multiple domains and web app in Business Catalyst


I have set up a secondary domain on my BC hosting successfully and have already set it up to point to a homepage and the url stays the way I wish, for example www.[secondary domain].com

I now want to setup a web app to use my secondary domain rather than my default, does anyone know how I would achieve this?

Fore example at present it looks like this www.[default domain].com/[webapp name]/ I would really want it to read www.[secondary domain].com/[webapp name]

I am going to have to use redirects when promoting the page and just accept that the proper url is going to be www.[default domain].com/[webapp name]/


Solution

  • BC serves all content the same, no matter which domain it is accessed from.

    Proper server-side 301 redirects are unavailable, since BC gives us no method to discriminate by domain. You can perform a client-side 'redirect' though, after comparing the hostname in Javascript (with something like document.location.host).

    There is also Liquid Markup, which you can use to detect the domain and vary the served content accordingly.

    You'll need to ensure all links to the app are fully qualified, including the preferred domain.

    I'd also add canonical links (<link rel="canonical" href="...">) to each page of the app. This will indicate the preferred domain to search engines.


    Note the inverse is also a problem; content on your primary domain will also be accessible through the secondary domain, causing rank dilution / duplicate content issues.