I have a SSL certificate for domain example.com. I want to redirect www.domain.com (and also the 2nd domain, e.g domain.com.au) request to the domain.com. In the example.com domain DNS setting I see
CNAME www.example.com is an alias of example.com
do I have to play with that entry or maybe set up that redirection on my server (Windows Server 2008 R2) ?
The CNAME only tells the browser (or more accurately, the resolver) how to find the IP address of the domain name. In this case, when the browser tries to resolve "www.example.com", it finds a CNAME record, so it needs to follow that alias and resolve "example.com". Eventually, it should arrive at an IP address to which it can make a HTTP(S) connection.
In short, yes, you need to setup the redirection on your web server as well.
Use URL Rewrite for redirections. It's a bit cryptic at first but it's a powerfull tool in IIS for this purpose. http://www.iis.net/learn/extensions/url-rewrite-module
Related
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.
I have my domain example.com on CloudFlare and a subdomain, fo.example.com, delegated to another name server.
This is the setting on CloudFlare
A www.example.com 1.2.3.4
CNAME test www.example.com
CNAME test2 www.google.com
CNAME test3 fo.example.com
plus the NS for fo. All the above have the orange icon, i.e. requests should go through CloudFlare.
and this is the setting on the other nameserver
A fo.example.com 5.6.7.8
Now, when I traceroute www.example.com, test.example.com and test2.example.com I can see that it goes through CloudFlare but when I traceroute test3.example.com it goes direct exactly as I traceroute fo.example.com. This looks incorrect to me, why requests to a CNAME pointing to an extrenal domain (google.com) goes through cloudflare and the one pointing to a delegated subdomain does not?
Very difficult to look at without knowing the actual subdomain in question. There are some records that can't be proxied (pointing to other CDNs, for example, does create DNS lookup issues in some cases).
CloudFlare supports answer:
That's not possible, no way around it either. I've tried.
Unfortunately our current system doesn't allow this. This has been a
feature request for awhile, it will get added eventually, but no ETA
as of right now, sorry.
This seems like a really stupid question, but I can't tell if my website uses the www subdomain or without.
I purchased an expired domain a month ago and set up Google Webmastertools with a sitemap and all. It's indexed, but when searching for the website name, it's no where to be found. Webmastertools says that 'no data is available.' The support states that the www subdomain may be a factor.
How can I verify this? I've used info: domain.com, site: domain.com, info: www.domain.com and site: www.domain.com It pulls up domain.com
Thanks in advance!
Need to find whether the both www and non-www are pointing to same IP address. For this, Open command prompt (click start button >> run >> provide code "cmd"). Once command prompt is launched, then run the code "Ping domain.com" you can find a IP address and then run "ping www.domain.com" and you get another IP address. If both IPs are different then you have setup A record in DNS.
If they are same IP address, non-www need to redirect www or www redirect to non-www. To find this, provide both URLS on http://www.redirect-checker.org/ find out which are getting 200 status. The 200 status URL are need to be added on webmastertool.
Let me know if you need further help.
Who is handling the DNS? If you own domain.com, the www. is (as you said) a subdomain.
You can register any subdomain you want as long as you are pointing it to somewhere. For example if I set up domain.com with DNS pointing to the hosting I would create an A record for the subdomain www that points to the same IP address.
From there I would check the Host server and (I use IIS) make sure that the bindings for the domain are set up, usually I bind it to www.domain.com as default and then just send domain.com there.
I hope this helps answer your question
I have many domains with different extensions, for example: website.com, website.net, website.org,...
the main site/domain is website.com where I have installed WORDPRESS
what I'm tring to do is to set all the others domain (website.net, website.org,..) to point on the main site/domain (website.com)
so, for example, if I go on "website.net" or "website.net/something" should I be redirect on website.com
I have cpanel so i guess that the first way is to add all the domains with the "addon domains" function, and then add in the wp-config.php:
define( 'NOBLOGREDIRECT', 'http://website.com' );
or another soluzion could probably be to simply park all the domains with cpanel function, or se the htaccess, but how?
what is the best solution in this case?
PS: the main website is in a subfolder (not root)
Just do a DNS forward and be done with it. Go to your DNS provider and just setup domain forwarding to your main domain name.
Forward website.net and website.org to website.com. When anyone goes to website.net it will redirect to website.com and same with .org. The domains will need to be parked.
If you host your DNS at a registrar like GoDaddy, then this will show you how.
http://support.godaddy.com/help/article/422/forwarding-or-masking-your-domain-name
Otherwise, the procedure is the same wherever your DNS is hosted. I suggest forwarding it without masking.
I want to (301) redirect all incoming traffic/links from blog.example.com to wwww.example.com. The blog.example.com subdomain does not exist anymore. How can I do this with the .htacess file on www.example.com?
This is a question better asked on ServerFault.
Anyway: This can't be done without having the domain. Domains are managed by the domain name system (DNS). Redirects are part of HTTP which is something completely different. If there's no longer a domain blog.example.com, the web browser can not resolve the address for it and thus has no way to connect to a HTTP server that could redirect it to www.example.com.
You need a valid DNS entry for blog.example.com otherwise this will not work. In your case you'd use a CNAME entry, i.e. tell the resolving system that www.example.com is the canonical name for blog.example.com. The client will then resolve www.example.com, but connect to the HTTP server with the host header being set to blog.example.com. This allows the HTTP server to answer with a redirect to www.example.com, which the client then can follow.