Mobile app version of vmapp.org
Login or Join
Candy875

: Cname forward from https to http We are migrating web host and I wonder if it is possible in the migration phase to do a CNAME forward from https://address1.com to http://address2.com. Would

@Candy875

Posted in: #301Redirect #DomainForwarding #Http #Https #SecurityCertificate

We are migrating web host and I wonder if it is possible in the migration phase to do a CNAME forward from address1.com to address2.com. Would the certificate still work even if the new domain doesn't have SSL yet?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Candy875

2 Comments

Sorted by latest first Latest Oldest Best

 

@Eichhorn148

A CNAME record does not "forward" anything, nor does it have anything to do with either HTTP or HTTPS protocols.

A CNAME record basically tells your nameserver that the record is an alias for another (A) record and it should lookup the value for that. For example:

example.com. IN CNAME example.net.


Would make your nameserver query example.net A-record, which could be like:

example.net. IN A 127.0.0.1


If you want to redirect from one domain to another, with a different protocol, you will have to instruct either your webserver or the visitor's browser to redirect the request. There are some ways to do that.


(Apache only) Create an .htaccess file in your DocumentRoot with a rule like:

Redirect / example.net/ Place an index.html file in your DocumentRoot with a META refresh to the secondary domain:

<meta http-equiv="refresh" content="0;url=http://example.net/">
Do something similar, but with a scripting language like PHP, for example an index.php file with:

<?php header('Location: example.net/'); exit; ?>

10% popularity Vote Up Vote Down


 

@Murray432

Yes it's possible to do the forward, but it won't work, you'd need a new certificate as @paulmorriss points out in the comments.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme