Forums

CNAME alias, can set www but not without (7 posts)

  1. Lennart
    Member
    Posted 5 months ago #

    Hi there,

    I have a WP site that is based on WP multisite.

    The domain of the site is hosted elsewhere.

    In the DNS records of the extneral host I have set the CNAME record for http://www.externaldomain.com to go http://www.ourdomainwithwordpressmultisite.com.

    But I also want that externaldomain.com goes to http://www.ourdomainwithwordpressmultisite.com. But I can't set this in DNS records of external hosting.

    But can I also make two domain mappings in our WordPress Multisite installation to fix this?

    Like: http://www.externaldomain.com as primary

    and externaldomain.com as second?

  2. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 5 months ago #

    Yes, do it that way :)

  3. Lennart
    Member
    Posted 5 months ago #

    Thanks Ipstenu, it is working. But I really don't understand why it is working.

    externaldomain.com is not in CNAME, so why is it still pointing to our domain http://www.ourdomainwithwordpressmultisite.com?

    And because it seems that it is pointing, could we also delete the mapping of externaldomain.com? What would happen then?

  4. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 5 months ago #

    If you delete the mapping of externaldomain.com then WORDPRESS won't know what to do with it. It'll probably 404.

    I don't know why externaldomain.com is working when it's not in CNAME. It's probably stupid obvious, though.

  5. Lennart
    Member
    Posted 5 months ago #

    Yeah,

    So it seems that some webhosting providers use the CNAME record of www also for the non-www URL. And other providers don't, so you have to make this CNAME record manually. Am I right?

    Strange thing is, I also have another client with external domain site.externaldomain.com which is CNAME'd to http://www.ourdomainwithwordpressmultisite.com. They also CNAME'd http://www.site.externaldomain.com to that URL. But for that client I only made one domain mapping: site.externaldomain.com and both work, www and non-www!

    How's that possible!

  6. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 5 months ago #

    I have absolutely no idea. DNS stuff is just shy of witchcraft to me.

  7. Andrea_r
    team pirate
    Posted 4 months ago #

    Apache is magic. :) As long as the domains are tossed at the right server, apache sorts out where (what folder) to send the request.

Reply

You must log in to post.

About this Topic