• Redirect domainAA to domainBB with mask

    Home » Forums » Developers, developers, developers » Web design and development » Redirect domainAA to domainBB with mask

    Author
    Topic
    #498160

    In my explanation I’m using fake domain names as examples.

    My office’s very uncomplicated website domainAA.com is very simply hosted by our ISP with FTP access only. All webpages are at the top level. We are bringing in someone to redesign the website in WordPress. No way to do that with the ISP. Our DNS zone file is with the ISP. Includes mail and remote access records.

    We have a Godaddy account for registered domains. I added hosting for one of those domainBB.com. There I put a near duplicate copy of our office website, with some small adjustments so I can quickly tell the difference. I created a base WordPress file under that for the developer to work on. Directory privacy added to prevent public access.

    We want the office website to continue to show up as domainAA.com.

    I contacted the ISP and asked them to do a “forwarding with mask” so that when someone goes to domainAA.com it will redirect them to domainBB.com but still show up as domainAA.com in the URL address line. We do not want domainBB.com to be seen. ISP says they can’t do that. They can forward but mask. Not in their ability to do what we are wanting.

    Really don’t want to move the DNA zone to Godaddy if we can help it. Spoke with Godaddy and they say our only option is to use htaccess.

    So far I have found how to redirect from domainAA.com to domainBB.com but it is not masking. When someone goes to domainAA.com the following script redirects but the visitor does see domainBB.com in the URL address line.

    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www.dpearson.com$ [OR]
    RewriteCond %{HTTP_HOST} ^dpearson.com$
    RewriteRule ^(.*)$ http://www.daviespearson.com/$1 [R=301,L]

    Once I have the htaccess working the way I want it to work, then I would remove the other files from domainAA.com so there would no longer be two, duplicate websites. Duplicate websites will hurt our SEO. The htaccess file would be the only file left at domainAA.com so will need to forward any domainAA.com pages to matching pages at domainBB.com.

    I’m hoping to find someone who has done this successfully and can help me out.

    Viewing 4 reply threads
    Author
    Replies
    • #1484705

      A domain is just a nice name for an IP address. You could make parts of your domain go to any IP address just by changing the DNS record and still retain other IP addresses for mail etc.
      e.g. change the DNS name “www” and “@” to point to the IP address of domainBB.com.

      cheers, Paul

      • #1484728

        A domain is just a nice name for an IP address. You could make parts of your domain go to any IP address just by changing the DNS record and still retain other IP addresses for mail etc.
        e.g. change the DNS name “www” and “@” to point to the IP address of domainBB.com.

        cheers, Paul

        A static IP address for the website not available through Godaddy.

    • #1484733

      Godaddy says I get a static IP when we add SSL. This is something we’d planned to do anyway.

      So, pointing www and @ to that static IP will continue to show dpearson.com in the URL address line? Or will it just be another way to forward without the mask? I’m afraid once I got to the expense and time setting up SSL, it won’t make any difference. Pointing the DNS zone file to the static IP will just be a forward.

    • #1484908

      I can’t see how to do it without DNS control.
      An alternative would be to set up the new site on the same server as the old, but in a different directory. Then it’s easy to swap back if required.

      cheers, Paul

      • #1485928

        … An alternative would be to set up the new site on the same server as the old, but in a different directory…

        No can do. We need the new website on Godaddy to have access to everything we will need to redevelop the site including but not limited to WordPress. Where it is now with the ISP they offer nothing. Zip. Buttkiss.

        …A domain is just a nice name for an IP address. You could make parts of your domain go to any IP address just by changing the DNS record and still retain other IP addresses for mail etc. e.g. change the DNS name “www” and “@” to point to the IP address of domainBB.com.

        I give up. I obtained the fixed IP address for the domainBB.com site once we have the SSL setup. Gave that to the ISP and they changed the website only IP to that. Didn’t work. Visitors to domainAA.com are being redirected to domainBB.com but loses the domainAA.com in the URL line. It shows as domainBB.com. We want to hid that.

        Apparently an impossible task I was given. I don’t see any other way to try this. I’ll have to move the DNS zone file to Godaddy away from the ISP. What a huge mess that will be.

        • #1486047

          I don’t see what the problem is. I have a customer that has four domain names and when you type in any of them, they go to the current website and the main domain name shows up in the URL.

          You go to the place that your domainBB is registered at and set the DNS records to those of the Registrar (GoDaddy, Blue Host, Globat, DRA etc) and then for the Host Records, add if not present “www” you select “URL Redirect” and put in “http:\www.domainAA.com”, and then add if not present “*” and select “URL Redirect” and put in “http:\www.domainAA.com” . Save and wait from a few minutes to a few hours for everybody’s DNS records to be updated.

          Now when somebody types in “http://www.domainBB.com” they are taken to “http://www.domainAA.com” and the URL shows “http://www.domainAA.com”. The same happens if only “domainBB.com” is typed in. This is what the “*” is for in the above setting.

          No can do. We need the new website on Godaddy to have access to everything we will need to redevelop the site including but not limited to WordPress. Where it is now with the ISP they offer nothing. Zip. Buttkiss.

          I give up. I obtained the fixed IP address for the domainBB.com site once we have the SSL setup. Gave that to the ISP and they changed the website only IP to that. Didn’t work. Visitors to domainAA.com are being redirected to domainBB.com but loses the domainAA.com in the URL line. It shows as domainBB.com. We want to hid that.

          Apparently an impossible task I was given. I don’t see any other way to try this. I’ll have to move the DNS zone file to Godaddy away from the ISP. What a huge mess that will be.

    • #1486062

      I can see now why it’s not working. The IP you want to redirect to already has a DNS entry so that’s what your browser will pick up.
      A masked redirect actually keeps the connection on the current server and then opens the second site in a frame. Your browser therefore sees the original IP address and DNS entry.

      As you surmise, the only solution is to move the DNS entries for both sites to GD – which you would need to do ultimately – then you can use any IP address you want in the DNS. This is not the mess you expect, it is just a timing issue as you don’t want the DNS entry removed before the new one is added – it will be, but only for a very short while.

      cheers, Paul

    • #1486628

      I was terribly frustrated and out of patience when I last posted. The issue resolved on its own with just a little time. To recap, the ISP who has our domain AA.com DNS changed the A records points to the static IP address of domainBB.com. It works the way we want. When you go to domainAA.com it goes to domainBB.com but does now show as domainAA.com. Good. I put in a .htaccess file to point domainBB.com to domainAA.com which is working too, mostly. I’ll post those .htaccess issues separately if I can’t figure them out. Thank you.

    Viewing 4 reply threads
    Reply To: Redirect domainAA to domainBB with mask

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: