• i recently had to set up domain mapping for a friend who has blog running on my network and due to the company they had their hosting and domain with it was a bit of a pain but we got it to work and so i thought i’d write a quick explanation of how.

    i’m using wordpress 3.1.2 on a linux server with the latest apache/mysql/php combo with cpanel. i’ve got my network set up with sub directories rather than subdomains (i don’t like the way subdomains look!)

    (if you haven’t installed the MU-Domain Mapping plugin then none of this will make sense! get it here though if you’ll be mapping other people’s domains to your network. follow the straight forward installation instructions and then read on…)

    Step 1: locate the IP Address of your site’s (mainsite.com) server (eg: 12.34.56.78)

    Step 2: if it’s a domain name that you own that you’re trying to map then go to your domain registrar, log in to your account and navigate to the DNS Management section. be careful, this is a potentially dangerous place to tinker about!. if it’s not yours, carefully instruct your client or site member in how to do
    Steps 2 & 3.

    Step 3: Locate the section called A Record. create a new A Record using the IP Address of your server from Step 1. Save your changes.

    now, this change could take a few hours to resolve (it might not, it depends on the mood of the internet!) so don’t worry about checking it for a while. in the meantime…

    Step 4: in your hosting cpanel go to the Parked Domains section and add a new one, ie: the domain name you’re mapping (mydomain.com). save your changes.

    Step 5: in Parked Domains you should now see your domain name (eg: mydomain.com) listed. click on “Manage Redirects” and add the full address of the sub directory you’re mapping the domain to, ie: http://mainsite.com/mysubdirectory save your changes.

    you need to do Steps 4 & 5 even if it’s not your own domain you’re mapping

    the next step is done in your wordpress dashboard (or the dashboard of your client/member’s site). if you’re sorting it from your own dashboard then go to Network Admin -> Sites and find the Blog ID of the subdirectory you want to map the domain to (just hover your cursor over the site name in the list and note the ID number in the bottom address bar of your browser). then…

    Step 6: if you’re doing your own domain mapping go to Tools -> Domains and add the new one using the Blog ID number and the domain name you’re mapping, ie: mydomain.com. select the check box for use as primary and click save.

    Step 6a: if you’re not mapping your own domain but have set the option to let your members map their own domains then after a few hours of waiting for the internet to catch up with your IP Address changes, tell your user to go to Tools -> Domain Mapping and they should see the domains that are available to them. they should select the domain they want to map and choose “Set Primary Domain”.

    if everything has been set correctly and the IP Address has propagated through the DNS network then when you type http://mydomain.com into your browser’s address bar it should take you to http://mainsite.com/mysubdirectory but show mydomain.com in the address bar.

    i hope this helps (and works!). i can’t speak to setting it up with subdomains, there are a few tutorials out there for that (setting wildcard thingies etc)

    if anyone has any comments or suggestions then please feel free to add them. i’ve used this process twice and it’s worked both times (albeit with a bit of kerfuffle the second time!)

    take ‘er easy, dude.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thanks for writing this up. Yes, this is how you do it with cpanel. Otto’s original instructions are the same – so are mine. 😉

    Also, the format of the original blogs (subdomains or subfolders) make no difference in how you map domains.

    Thread Starter jack randall

    (@theotherlebowski)

    🙂 i’m just glad i got it right! writing it up was more of a thought clarification device

    Thread Starter jack randall

    (@theotherlebowski)

    bit of an update/request for help:

    i’m now getting this error when i go to http://hierophant-nox.com which is the domain i mapped the other day.

    403 Forbidden

    You don’t have permission to access / on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    i’ve checked and double checked all the settings regarding the mapping plugin, i’ve parked and redirected the domain to the blog url http://ryzar.com/hierophantnox and it’s been working on and off.

    the only thing i haven’t got access to/control over is the A Record settings for my friends domain name. could that be the bit that’s not set right? i’m scratching my head with this one…

    regards in advance 😀 jack.

    that’s a server-side error. 🙂 so you need to check folder permissions on the server end.

    check and see if a folder was made for that mapped domain too – it shouldn’t have been, but you never know.

    Thread Starter jack randall

    (@theotherlebowski)

    there was a folder created but i figured it shouldn’t be there so i deleted it. i’ve been in touch with my hosting and they pinged the domain and it was still pointing at my friend’s old hosting IP even though the tech people at her hosting/registrar have said they’ve changed the A Record.

    i did a traceroute on the domain name and it showed two A Records, one for my server and one for the original server… very frustrating, i’ve got a client who’s getting very annoyed at the moment. grrrrr

    then they need to delete the old A record.

    And someone needs to put that domain at a registrar where you can edit these things.

    Thread Starter jack randall

    (@theotherlebowski)

    it would be more useful to have the domain somewhere i can get at it, i’ll see what the chances are regarding moving it to another registrar. she with hostpapa.com and frankly they seem like a bunch of ass clowns…

    it looks like the Record has updated as we can both get on the site via the domain name and it seems stable enough (for the moment!).

    that was way too much effort for something that should be pretty straight forward. hopefully the next time it won’t be such a performance!

    thanks again andrea_r for your comments and thoughts, always good to get feedback and advice from people who really know their stuff 🙂

    This procedure did not work for me. I’d love some help.

    This is what I have:

    • I own all the domains.
    • They are all registered on my godaddy account.
    • I own a linux based reseller hosting account with midphase using cpanel.

    This is what I did:

    1. I set up a subacount for domain A and parked domain B on subaccount A.
    2. I set up an A record on domain B pointing to Domain A’s IP.
    3. I installed the MU-Domain Mapping plugin.
    4. I configured my network with subdirectories.
    5. I configured my subsite to use domain B as it’s “Primary domain for this blog”

    Unfortunately all I get is a redirect to a cpanel page which looks like “www.domainB.com/cgi-sys/defaultwebpage.cgi”

    Any ideas how to make this work?

    David

    talk to your webhost – tell them you’re parking it on that account and it’s not showing the right spot.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    DSMagic – Make a new topic, please.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘domain mapping and how i did it’ is closed to new replies.