linux – Redirection from "dominio.com.br" to "subdominio.xyz.com.br"

Question:

I have a redirect/pointing issue and I believe it's some incorrect server configuration. I have a VPS (digital ocean) running Ubuntu14 (terminal) with Apache, PHP5, MySql. I have full access to the DNS settings of this VPS and domains (Registro.br).

The problem is the following: – I have the domain: http://etiquetasribeirao.com.br in Registro.br – I have the following subdomain in the VPS: http://etiquetasribeirao.netshops.com.br

I want that when accessing the domain, the subdomain's website is displayed, like a note, keeping the original accessed domain in the browser's address bar.

I've already set up the CNAME record in "registro.br" but without success.

can anybody help me?

Thanks.

Answer:

In the Apache configuration file, which you set up the server the VirtualHost (similar section to the code below) of etiquetasribeirao.netshops.com.br , you must create a ServerAlias as is below:

<VirtualHost *:80>
  ServerName etiquetasribeirao.netshops.com.br
  ServerAlias etiquetasribeirao.com.br 
...

And registro.br you must create a record type A (Host) in the field etiquetasribeirao.com.br pointing to the IP of your server etiquetasribeirao.netshops.com.br .

Scroll to Top