Score:-1

CNAME to an external subdomain?

cn flag

I have a domain which is hosted at Cloudflair so I have full access to its DNS entries. Then I have an external IIS website and again I have full access there.

How can I set the DNS up so that myhostname.mydomain.com redirects to https://site.myserver.com?

If I setup a CNAME with the the Name "myhostname" and the Content site.myserver.com it always directs to myserver.com, i.e. the root not the subdomain.

I then changed the bindings on the IIS site (myserver.com) so that incoming Hostname myhostname.mydomain.com would be bound to site.myserver.com but it still returned the root web.

Anyone know what I can do?

Zac67 avatar
ru flag
A CNAME record doesn't redirect. It creates a host name alias. A web server needs to be configured to serve that name. An HTTP redirect requires a server at that address.
es flag
[You can create a page rule in Cloudflare to do the redirect on mydomain.com zone.](https://support.cloudflare.com/hc/en-us/articles/218411427-Understanding-and-Configuring-Cloudflare-Page-Rules-Page-Rules-Tutorial-)
Score:1
vn flag

If the IIS site will accept the incoming Hostname myhostname.mydomain.com, then perhaps the simplest solution is to skip the CNAME record and create an A record myhostname.mydomain.com -> [IIS server's IP address].

If you're using Apache, you can do the redirect you're asking about with the rewrite functionality in your site configuration file, or in the .htaccess file.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.