CNAME to an A - pointer To webpage - iis

Is it possible to use a CNAME pointer, that points to an A pointer that points to the webapplication?
I've tried this multiple times now, without any success, and i start to think that it is not possible?!
i got this
"Bad request, invalid hostname" think its an 400 error.
If it is not possible to do it this way, can someone please give me some ideas how to start?
My web application:
I got a couple of users registered at my web application.
Each users is supposed to get an sub domain, for example, user1.mydomain.com (A-pointer to web.mydomain.com, where all the aspx filer are)
by reading the domainname I get the userID.
If this is not possible i have to put a lot of files in each domain, which i dont want to do. what would you do?
wildcards is not possible.
Why a cname to a A? i have to take into account that each user maybe want to point their domain to his or her account at my place. so their pointer should be a CNAME...
Thanks!

The problem is that your virtual hosts are not configured to accept requests for the domain the the CNAME record is for.
You need to set the ServerAlias directive (assuming you are using Apache) so it contains all possible variants that you want to use to access your app.
A CNAME record is simply an alias of an A record, so it will always resolve to the IP that the A record points to. What you need to do is tell your web server how to handle those domains (it's based on the Host: header of the HTTP request).
You will find that you have same problem if you create A records for your other subdomains, instead of CNAMEs.
If you need to dynamically add/remove users, you would probably want to use mod_vhost_alias so you don't have to restart Apache every time you do it.
EDIT Sorry, just noticed the reference to aspx, which presumably means you using IIS, which means I can't tell you exactly how to configure it since I know next to nothing about IIS. Re-tag this question with IIS and someone will probably be able to help :-)
ANOTHER EDIT This page from M$ may help you with IIS virtual hosting, although I still don't know how to do it dynamically/programmatically.

Related

Put a subfolder onto a different server with CNAME

Here's the situation. Website.com is an ASP site which needs a blog that is to be Wordpress. So the website.com/blog needs to be hosted onto a php-friendly server. The company hosting the ASP site doesn't want to have anything to do with Wordpress so we have to use some of the shared hosting providers.
How do I have the Blog section placed onto an entirely different server? I've heard this is done with CNAME, but I've never used it. Most of the research I've done revolves around subdomains, but I need a subfolder mapping, and there's not much to read about putting subfolders onto different servers with a different IP and everything.
Thanks.
There are a few different options:
you can bring the traffic to your own server and then redirect to
the correct location
you can bring the traffic to your own server and then proxy it to the correct location
you can direct the traffic to the correct location either via full page or an IFRAME type mechanism
Each option has some benefits and drawbacks depending your devs knowledge level and your infrastructure. Regarding subdomains, you could use a combination approach where you, for example, use subdomain.yourdomain.com to point to a server instance (can be the same server or a totally different one) that maps the subdomain.yourdomain.com name to a specific path, usually via Host header.
A CNAME is a function in DNS that says "Whatever thing you wanted to find for this name, use the same thing for that other name instead". When you're working with web stuff the "thing" in there is nearly always an IP address.
That is, what a CNAME can do for you is to say that when a user's web browser tries to look up the IP address for website.com, it will use the IP address for someotherwebsite.com. Note the total absence of anything web-related, like subfolders, in this. CNAMEs work on whole domain names, nothing else. Since you want to serve only a part of the stuff at a particular name from another server, CNAME cannot help you. CNAME is the wrong tool for you problem. Do not taunt happy fun CNAME.
In order to serve website.com/blog from another server than website.com, you pretty much have to do some sort of reverse proxying (where the ASP site's server relays requests between the user and the Wordpress server). It's probably easier and more robust to give the Wordpress site its own name (blog.website.com or something), and redirect to that from website.com/blog, but only you can know if that's politically possible in your case.

Cloud Service Custom Domain Redirection configuration

i am not sure whether this correct words to describe the problem, but i try my best to explain.
Suppose i deployed a cloud service with A Name. now client ask me give me something good domain name rather than A.cloudapp.net, so according to need i given him fancy domain name A.myapp.com.
After some time they thinks A is not a good name , give me B. so i change the deployment to B.cloudapp.net and then configured custom Domain Name as B.myapp.com.
Client again comes as says my customer is still using A.myapp.com. Can you do something to redirect them to B.myapp.com. with message that it moved to another address.
As i know i used only CNAME and ARecord on domain registrar . how can show a message over there. That this page is moved to other domain.
If A.myapp.com is no longer in the DNS records then the only way that it's still working is that the DNS propagation hasn't taken full effect yet. That can take even up to a few days. Once that happens then A.myapp.com should no longer resolve. This might also be working if you have a wildcard record for #.myapp.com pointing to the same A.cloudapp.net site.
You can create the A.myapp.com DNS record (if it's not still there) and point it to the same cloudapp.net app again, but then in your cloud app look at the hostname as it comes it to the request. If it is A.myapp.com show them a specific page that reminds them this is now B.myapp.com and then redirect them.

Websitepanel and / or IIS : Create a global DNS / subdomain redirect for users to access the control panel. I.e. cp.whateverdomain.com

As per my subject, I need ideas / help on creating [cp].whateverdomain.com, and loading the control panel when that gets hit.
I want this to be a "global" setting, affecting all domains. I understand binding to a port, but I don't understand how to "bind" the control panel to a [cp] subdomain for all domains.
So basically, user will login through cp.domain.com , instead of domain.com:9001
I would greatly appreciate some insight into how this happens, i.e on other servers / setups. Arvixe uses cp.domain for all control panel access. I am also looking at various other scenario's where I want to use a global subdomain/pointer for different things, hence I would like to "understand" what needs to happen to DNS , IIS, and website panel, to achieve this.
In a nutshell, if I remember correctly, you need an extra IP for unique things such as this. YOu need to "bind" the subdomain to that ip, and it should resolve for all domains on the other ip's. I might be off the track a little, this was a while ago for me. I did not want to offer up one of my ip's for cp, so I just stuck with the port.

DNS question nearlyfreespeech with heroku

So I'm trying to use a domain I registered at Nearlyfreespeech(NFS) to use it with heroku. How do I do that? I am new to this, but the NFS help seems to be full of jargon and confusion, and heroku is posting email setting up video on the domain help page. Your human language input will be deeply appreciated!
Two parts to this, you'll need to add the custom domain addon to your Heroku application with the domain you intend the application to be available on, eg. www.myapp.com
Then (I've not used NFS) but you probably need to head towards something like Advanced DNS in your NFS control panel - you're looking for the ability to edit DNS records for your domain. You'll probably find a www. entry already exists - it would usually show the 'type' of record it is, if it's a series of numbers separated by dots then it's called an A record. If it is numbers with dots then you need to delete that entry and then add a new entry of type CNAME and set the host to www and the value to proxy.heroku.com. If it's already a CNAME type then you can just edit the value to be proxy.heroku.com
Hopefully that will get you going in the right direction.

DNS two domains one server

Greetings All,
Long time reader first time poster.
I work for a small school district. We are our own SOA so we can pretty much do what we want.
In the state of Washington all educational institutions are given a name like myschools.wednet.edu. I've recently purchased a new and hopefully easier to remember domain myschools.org and I'd like to use both domains and have them point to the same information and subdomains i.e. helpdesk.myschools.org would equal helpdesk.myschools.wednet.edu. I'd also like this to work with e-mail but I think this is a bit more complicated.
I'm sure this has been done, but I'm not entirely sure I'm asking the question in a way that can be easily answered.
Any and all help is appreciated.
TIA,
Dave
To do this, you'll have multiple DNS record entries (A-Recs) pointing to the same IP Address. You may also need to tweak IIS (or your web server software) to accept requests coming from both domains.
So...in your DNS manager (e.g. in Register.com or whereever you manage your domains) change the A-Rec to point myschools.org (your domain) to the same server IP address where myschools.wednet.edu is currently pointed (I take it that you told them where to point the subdomain).
If you are using IIS then setting up multiple domains on one web site is easy. You'll create just one web site (or use the one to which wednet.edu points). Next, right-click the web site in IIS and choose Properties. On the "Web Site" tab, click "Advanced" and in the resulting dialog, use the "Add" button to add your additional domains/subdomains. That's all you'll need to do.
Hope this helps!
If you want lots of subdomain entries to map from one domain to the other then you'll need to either add A or CNAME records in the new domain pointing to the old domain.
In most cases I'd recommend a CNAME, however if you want the unadorned "myschools.org" domain to respond to HTTP requests that would have to be an A record, because you can't put in a CNAME at the top level of a zone.
Alternatively, there's a relatively new DNS record type called DNAME which can map an entire domain to another in one fell swoop. Unfortunately it's not widely supported yet.
All you should do is create two 'A' records, one of host-type '#' and the other one of host-type 'www' both should point to the IP address of your server.
It could be a bit confusing, here's an example of how to set it up #GoDaddy's:

Resources