How do I redirect a domain?
I have my domain mydomain.com which opens my site correctly at mydomain.com. I want to redirect say mydomains1.com to open my site at mydomain.com. I was thinking of adding a record mydomains1.com to target the IP address at mydomain.com but this is not working.
Any suggestions??
1 Reply
I was thinking of adding a record mydomains1.com to target the IP address at mydomain.com but this is not working.
- Establish the domain mydomain.com with an IP address.
- Establish the domain mydomains1.com with an IP address (can be the same IP address as in #1…for a single Linode it should be).
- Wait for propagation to happen (24 hours).
- In your (apache2) web server, set up something like this:
<VirtualHost *:80>
ServerName mydomains1.com
Redirect 301 / http://mydomain.com/
</VirtualHost>
<VirtualHost *:80>
ServerName mydomain.com
. . .
. . .
</VirtualHost>
- Restart apache2:
sudo systemctl restart apache2
- Test with your browser.
-- sw