0

I have two domains, for example:

  1. md.com
  2. mydomain.com

I want first domain to go to same website as second domain.
I want first domain to be a shorter domain like other websites have.
My question is, how can I assign the first domain to the second one?

First and second domain will point on same server.
Right now the first domain has the first IP and second domain has the second IP of the server.

I tried to point the first domain to second, but the second domain is using HTTPS, and web browsers block the first domain; because it is pointing to a secure server which has a different hostname.

I have WHM dedicated server.

0

So you server has 2 IPs? And what do you mean with the following:

how can I assign the first domain to the second one


You can simply redirect all the requests made on the 1st domain to the 2nd.

Or you can do it on DNS level by setting a DNS record like so:

----------------------------------
| Type  | Host   | Value         |
----------------------------------
| CNAME | md.com | mydomain.com  |
----------------------------------

Or use the same IP on both..


Please say some more details about what you want to do.

| improve this answer | |
0

Do it with DNS CNAME record:

mydomain.com.    IN      A      10.20.30.40
md.com.          IN      CNAME  mydomain.com.

Or maybe with Apache rewrite redirect (.htaccess for all domains webroot):

RewriteEngine on
RewriteCond %{HTTP_HOST} !^(www\.)?mydomain.com
RewriteRule (.*) http://www.mydomain.com/$1 [R=301,L]

Or maybe with something else?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.