• Resolved chrisv2

    (@chrisv2)


    I’m having a problem in native 4.5.2 (no plugin installed, fresh install so no old mapping cleanup needed).

    Please note, my WP install is on a shared IP host and not at a dedicated IP address.

    Here’s what I did:

    1. Went to registrar and set up a CNAME pointer for https://www.foosite.com to map to chrisv2.myWPnetwork.com

    2. In network admin for chrisv2.myWPnetwork.com, I set the site address to https://www.foosite.com/

    The result is that when I put https://www.foosite.com into my browser, I get sent to my hosting company’s default page. So, it is making it to my hosting company but not going all the way to my WP installation and to the desired network site.

    If my WP installation was at a dedicated IP address, would this issue be solved? Or am I missing something else?

    https://www.ads-software.com/plugins/wordpress-mu-domain-mapping/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Ron Rennick

    (@wpmuguru)

    Check your hosting control panel to see if you can either park a domain or create a domain alias (different terminology for the same thing). If you can do either then you need to park or alias the domain you want to map onto your WP install.

    Thread Starter chrisv2

    (@chrisv2)

    Thanks Ron – is domain parking always a requirement — or *if* I had my multisite sitting at a dedicated/static IP address would it work without parking the domain at my hosting company?

    Plugin Author Ron Rennick

    (@wpmuguru)

    It only works without parking on a dedicated IP when the WP install is in the default virtual host for that IP address.

    Thread Starter chrisv2

    (@chrisv2)

    ok, understood and thank you Ron. So, to summarize:

    1. I have WP multisite up and running as the single hosted site in my hosting account, and also with a static IP address.

    2. I (think?) I have to also edit wp-config.php and add: define('COOKIE_DOMAIN','');

    3. Customer requests and receives a new blog instance in the multisite network: customer.mymultisite.com

    4. Customer registers a domain www.foosite.com, and at registrar he sets a CNAME record to point www to customer.mymultisite.com

    5. I go into admin for customer.mymultisite.com and set the URL to www.foosite.com

    Then, everything works as expected – all URIs using www.foosite.com will work. If this is correct, then I’m home free. I will give it a shot if you don’t think I’m missing anything.

    Plugin Author Ron Rennick

    (@wpmuguru)

    2. I (think?) I have to also edit wp-config.php and add:

    Do not do that.

    For 3-5: You would be better to create a standard CNAME that is used by all your subsites (ex. cname.mymultisite.com). When you edit the URL in #5 the customer.mymultisite.com disappears.

    Thread Starter chrisv2

    (@chrisv2)

    Ron, forgive my ignorance here…but when someone new comes to my multisite and they click on “register”, then they are picking a name when they register. BillyBob12 signs up at the site and he is going to get a new site called billybob12.mymultisite.com

    So, how can I have a single CNAME that’s used by all subsites?

    Also, I tried (hard!) to not add that define('COOKIE_DOMAIN','');
    to my wp-config.php but without that line of code I was not able to log into the newly mapped subdomain site. WP login was giving me a “browser does not support cookies” error.

    Is there some bad side effect I am going to have by having that define statement in my config file?

    It is actually working now! The remaining issue I am having is that www.foosite.com is mapping perfectly to customer.mymultisite.com — but foosite.com will not map; it goes to the default page at the registrar. I tried adding a CNAME record for *.foosite.com to point to customer.mymultisite.com and still no luck.

    Thread Starter chrisv2

    (@chrisv2)

    Upon further reading, the mapping of the root TLD (footsite.com) to another domain is a non-trivial problem. Looks like I am going to end up using Amazon Route 53 as a DNS service since they’ve added an “alias” record type that can handle this. Normal DNS like at GoDaddy will only allow the root TLD to map via an A record to a real IP address.

    That’s an “ok” solution but down the road if I were to move to a different hosting service (i.e. different static IP address), I’d have a bunch of unhappy customers who will have to go back into their registrar and change the A record.

    Apparently, using Route 53 to handle all DNS services will make the client side of the equation a lot easier. I hope.

    Thread Starter chrisv2

    (@chrisv2)

    OK. I’ve been on this for 20 hours straight and I think I finally figured it out. My goal was to enable CNAME only mapping, handling both www.foosite.com and foosite.com — with no worry about a dedicated/static IP address and with the goal of the clients to ONLY have to update their nameservers at the registrar, not have them try to deal with CNAME or A records. Oh, and I’m on a CPanel host so I have no access to Apache config, or logs.

    I should probably write this up somewhere but the net is:

    1. Amazon AWS Route 53 handles the DNS, create a hosted zone for the client’s registered domain (foosite.com) with a www CNAME pointing to www.mymultisite.com

    2. Set up an S3 bucket in Amazon AWS for the (non-www) client’s foosite.com and statically map that to www.foosite.com

    3. Back in the Route 53 hosted zone, create an A record for the (non-www) foosite.com and specify it as an Alias, pointing it to the bucket created in step 2. This assures that both www.foosite.com and foosite.com will end up pointing to www.mymultisite.com (look mom, no static IP address needed! ?? )

    4. In the multisite network, go to the client’s site in network admin and edit the site URL, changing it to www.foosite.com

    5. In the CPanel account that hosts mymultisite.com specify an add-on domain called foosite.com and point it to public_html (or wherever you have WP installed). This effectively creates a virtual host record in Apache config, for the incoming mapped site.

    I also tried it in Godaddy and got it to work, but not the root TLD (only www), whereas I am confident that Amazon’s Alias mechanism is handling both www and non-www nicely via the bank shot to the S3 bucket.

    With this setup, all I have to do is tell my client to change their nameserver designation at their registrar to the AWS nameservers I give them — and BAM, it works.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘CNAME problem’ is closed to new replies.