Mobile app version of vmapp.org
Login or Join
Reiling115

: I want to park my domain www.b.com to www.a.com So far is working, but if the user visits b.com, I want the browser url to display a.com Is there a way around it?

@Reiling115

Posted in: #Apache #Domains #Redirects

I want to park my domain b.com to a.com
So far is working, but if the user visits b.com, I want the browser url to display a.com

Is there a way around it?

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @Reiling115

4 Comments

Sorted by latest first Latest Oldest Best

 

@Miguel251

You could just use mod_rewrite in your .htaccess file.

The Apache docs have a great example: httpd.apache.org/docs/2.3/rewrite/remapping.html#canonicalhost
Drop this in your .htaccess file and all requests will be re-directed to a.com:
RewriteCond %{HTTP_HOST} !^www.a.com [NC]
RewriteRule ^/?(.*) www.a.com/ [L,R,NE]


Also, don't forget RewriteEngine On if needed.

10% popularity Vote Up Vote Down


 

@Jessie594

You can simply forward b.com to a.com in your registrar account GoDaddy for example or where ever you registered the domain. This is better than doing it with any server side script. Another option is to create a CNAME record.

10% popularity Vote Up Vote Down


 

@Hamaas447

It's a bit unclear where you want the web content to come from. If the user visits b.com, you can set two things in action:


Effect a redirect to a.com, where the content is coming from the server at the other end of a.com and the URL is to match.
Mirror the content of the server at a.com under b.com, with that as the URL being accessed.


If you're serving data from a server at the other end of b.com, you should leave the URL as such. Cloaking it to read a.com is possible with some older browsers, but is a Bad Internet Practiceâ„¢ for multitudes of security reasons.

It sounds like you'll be most successful with a domain redirect as referenced in @Aeronaught 's comment.

10% popularity Vote Up Vote Down


 

@Kaufman445

Possible a domain redirect using Domain B's name servers and A Records.

Or using Domain A's control panel to set up a redirect there

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme