Binding all subdomains to single domain in windows server - dns

I have made my A record in dns
*.mysite.com A xxx.xxx.xxx.xxx (the ip)
Now at my server I want to bind all of the subdomains to www.mysite.com
binding does not allow using *.mysite.com but allows using * and it works as I want to. but the problem is that it binds other websites on the server too.
by the way:
*.mysite.com CNAME www.mysite.com
does not work and I don't know why.
Any suggestion how to do this?

I solved it by creating default website bibding it to an empty hostname this does what I want but the problem is all other domains that are pointing to my server, If not binded to anything will be directed to the same site, but this is not a problem in my case.

Related

OVH VPS doesn't allow connection

I have a domain name at godaddy and I set it up so that it will redirect to my OVH VPS.
You should know that in godaddy it is possible to do the redirection in 2 ways.
1) - Redirection only (Forward only) and so once I go on my domain name (www.example.com) I am redirected to vpsXXXXX.ovh.net which is visible on the bar of my browser instead of www.exemple.com and I arrives on my site (web application installed on my vps) successfully
2) - Forward with masking, and here the difference is that vpsXXXX.ovh.net is not displayed in my navigation bar, it is still www.example.com which is displayed but my vps refuses to answer and i get this: vps719806.ovh.net does not allow connection .. on my browser.
What should I do to make OVH agree to answer?
Thank you in advance.
Solved by adding an A type dns record in my dns dashboard pointing to my vps #IP adress instead of using forward method.

Using GoDaddy domain with No-Ip

I have a GoDaddy domain www.exmaple.com which points to 255.255.255.255 (fake IP of course). My web server is behind a router that forwards port 80 to the appropriate port. All fine and dandy. However, like 99% of people out there, I have a dynamic IP. So I set up a hostname with noip.com called helloworld.ddns.net, set up their update client on my server (so it can update them whenever the IP changes (hasn't happened yet but i'm hoping it works as advertised), and then went to godaddy.com to change my records. Which is where stuff gets as hairy as harambe.
I started off by removing my A record, and changing my CNAME to point to helloworld.ddns.net.
Didn't work.
Googled around, and found that I need/should use the noip NSs. So I went back to godaddy, and changed my nameservers from theirs to the noip ones... ns[1,2,3,4,5].no-ip.com.
Still doesn't work. Should also point out, that after I made this change I lost the ability to set any records on my domain name. Which I guess makes sense since there's no point in godaddy having a record if I'm not using their NSs.
Tl;dr: How do I point godaddy domain, www.example.com, to a noip hostname, helloworld.ddns.net, which in turn points to my dynamic home ip, x.x.x.x.
Finally managed to solve my own issue, and I feel very silly for not realizing what the issue was before. The problem was that the CNAME was pointing to a subdomain (www) and therefore one couldn't access the site without including this in the URL. Summarised solution:
GoDaddy now has CNAME with a specific host name (ex www) and the noip domain as the value
No A record
Kept the default GoDaddy NSs
Configured forwarding w/o masking, to www.example.com... therefore, when someone tries to access example.com, they are automatically forwarded to the www subdomain.
A little bit of patience for propagation and everything was up and running.

How will a CNAME DNS affect Google Engine

I'm hosting a clients site at client.mysite.com, but my client want to have its own domain, like www.clientsite.com.
With a CNAME configuration, I'll be able to hook my client domain to the content, but... considering I'm still hosting my clients content, which domain will be finally listed on Google with contents of client.mysite.com contents?
a) mysite.com
b) clientsite.com
Thanks for helping.
In the DNS hierarchy, the CNAME resource record will be attached to the clientside.com. A CNAME is simply a reference to the location of that site's A record. With that in mind, I believe mysite.com will be listed as hosting the data.
Does your client want it to appear under his name?
If so, then this should not be solved using DNS (well, not only using DNS).
If your client wants to get the content listed under his domain name, the best way to do this, is to add their name to your server.
Then point client domain name to your server.
The best way to do the pointing (when also considering SEO)
is to make an webforward (301 permanent) from the root, to the www
and make the www subdomain point to the ressource.
(Or vice verca)
IF you are using the example above (webforward on root) you can use a cname instead of an A record to point the domain name. However do not add a cname to the root of a domain (effectively shutting down your domain name).
So-
Short Answer:
client.mysite.com will have the content (also according to google).
Any attempt to obfuscate this is black hat or grey hat ;)
a better way of doing it is to simply setup the clients domain name on your server.
Then point only one hostname to the server. Server host/headers will take care of the rest.
Setup in DNS
# webforward 301 www
www a or Cname to server
Quick rules:
NEVER put Cname on the root of a domain
Only allow 1 hostname to show content (can be done both as explained above via DNS/webforward or via server configurations)

How to redirect different sub domain requests to different servers

Under my domain, one of the subdomain must be directed to one server that hosts the relevant applications, and the rest must be directed to another server that hosts the relavant applications.
So, any requests to the url appa.example.com\* must be directed to one server, and any requests to the url appb.example.com\* must be directed to another server.
The issue now is how to configure the Apache configuration on both servers-- maybe using configuration like ProxyPass or ProxyPassReverse so that they all the incoming requests can be directed correctly at the correct server?
Edit to make the question clearer.
The place to link an url to an IP (server) is the DNS.
For example if server A is at 1.2.3.4 and server B at 5.6.7.8 you link appa.example.com to 1.2.3.4 and appb.example.com to 5.6.7.8.
But if both servers are behind a firewall (with a single external IP address) you have to perform some tricks. (And you are probably looking for these tricks).
Have a look at An Introduction to Redirecting URLs on an Apache Server.
I've done the same thing for my workplace (a University). Our primary website it hosted elsewhere but part of the site (student registration system) is hosted onsite.
What I did was to create a Authoritative (A) DNS Record (reg.domain.com) and made it point to the IP of our onsite server. And that did the trick!!!
Here's a screenshot of the same from my domain CP (domain and IP masked for obvious reasons)...
alt text http://img443.imageshack.us/img443/5069/stiuaregrecord.jpg
It's essentially the same as what you're trying to do. Give it a shot and see :)
In the DNS records/manager for the parent domain of the intended subdomain:
point the subdomain name at the to-be host servers IP address, then ...
... Then ...
In the host server DNS and or server-software config: direct the subdomain to the website app. You can achieve this by one of: -
manually edit the DNS records,
park the subdomain and point it at the website document root folder, or
add the domain and subdomain (domain will never be used since its not pointed at applicable server). Point them both at the document root for your now subdomained (if there is such a word) website app

Subdomain mapping to another external subdomain

I'm trying to map help.domain1.com to help.domain2.com. I've seen this on UserVoice. They let you map something.yourdomain.com to something.uservoice.com.
On domain1.com I've set up a CNAME to help.domain2.com.
It works fine but when I open help.domain1.com I get the content of domain2.com instead of help.domain2.com.
After some experimenting I've realized that this is an expected behavior.
So my question is what do I have to do on domain2.com (or maybe on domain1.com?) to have it show content of subdomain "help.domain2.com" when I navigate help.domain1.com?
(I'm using Plesk and the OS is Windows Server 2003)
I was facing the same problem for the last couple of days, and just found the solution...
In /etc/apache2/site-available/default, I had two virtual hosts, first one was for my domain, and the second one was for my sub domain. All I had to do was reverse the order of the virtual host blocks, placing the sub domain in front of the domain, and it worked! :D
I found the solution. One way would be to use a mod_rewrite rule on domain2.com and do a redirect if referrer is domain1.com. Or to assign a dedicated IP address.
HTTP/1.1 uses the Host: header to figure out which site is being requested, should there be more than one site hosted on the same IP address.
You need to ensure that the second (target) web-server is configured to expect incoming HTTP requests with the original URI in them.
I am not 100% sure how to do this in windows but in apache you just need to setup a virtual host to redirect it from the main domain to your subdomain.
you do not say if you are using IIS or apache or what the webserver is.
I imagine that what you need to do is setup a new website in IIS (not a virtual directory) and in the website tab click on advanced and edit the entry in there so that the "host header name" is the subdomain you want.
Jon Hawkins

Resources