A record / CNAME redirect - dns

How can I set up e.g. when I type www.example.com (so, my domain which I have access) to points to https://stackoverflow.com/questions/ask (I don't have acces, I just want to redirect there) using A record or CNAME in my domain name register?

There are two ways of doing this; DNS and HTTP redirect.
If you use DNS, you can only redirect the www.example.com to stackoverflow.com only (not its sub-directories).
Another approach is to create .htaccess in your www.example.com and redirect the page to https://stackoverflow.com/questions/ask. Please read here
It seems you need to take the second approach because you want to redirect your users to specific sub-directory.

Related

How to Point www and Non www site to an ALB in Route53

I want to point www.example.com and example.com to a server behind the ALB in such a way that whenever someone types www.example.com or example.com he will always go to www.example.com. following are my records
example.com A simple yes dualstack.[alb].com
example.com NS simple no ns.[].com etc....
example.com SOA simple no ns.[].com etc...
www.example.com A simple yes dualstack.[alb].com (same as the first record in the list)
currently it is always going to exmple.com regardless of what we type example.com or www.example.com and site is working perfectly. But I want to alway go to www.example.com regardless of what I type in the search bar www.example.com or example.com....
What records should I put here to achieve this task???
Please ensure that the redirection is not done by your application server.
Assuming that you use Application Load Balancer you could use listener rules to handle redirection to www. domain.

How redirect from subdomain to other domains URI?

Is there any DNS or .htaccess (or combination of a two) solution for this type of redirection:
blog.mydomain.com point to medium.com/my-publication
And yes I am trying to apply this specifically to medium.com publication so if SSL certification or any other environmental conditions are relevant you check how it handles it. I have full control of my domain on the other side.
I am looking preferably into DNS solution because I will not be able to test .htaccess for a while.
Well, as far as I know the only relevant DNS record would be a CNAME record, and it would only allow redirecting the entire subdomain to medium.com.
NAME TYPE VALUE
-------------------------------------------
blog.mydomain.com. CNAME medium.com.
To redirect to a specific URL, .htaccess would be needed, or a webserver that returns a redirect. If it were me, I'd setup a redirect for that specific article:
blog.mydomain.com/my-publication => medium.com/my-publication
But this requires a webserver being setup at blog.mydomain.com.

Is my website www or without www subdomain?

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

Redirect www.subdomain domain mask to subdomain

I currently have subdomain.example.com as a domain mask for my website, using a CNAME record in my DNS settings. The website it is masking (lets call it mask.external.com) recognizes subdomain.example.com on its server and gives us a specific page.
My issue is that www.subdomain.example.com was bringing up a 404 'page not found', and after adding a CNAME record making www.subdomain.example.com as a second domain mask for mask.external.com, would simply give us a general page (not tailored to our website).
I was wondering if there was anything we could add (DNS records, .htaccess, etc) that would redirect www.subdomain.example.com to subdomain.example.com BEFORE it tried to visit this external service, so that we could properly serve it to users who type www.subdomain.example.com
Thanks in advance!
If you have cpanel then there might be an option in your cpanel to redirect subdomains to domain with and without a prefix "www".

Subdomains not working when www is added?

I have purchased My Domain name from one registrar & hosted in another hosting company.
I have created a sub domain from my hosting domain manager lie http://subdomain.domain.com and it works fine. But when someone types in www.subdomain.domain.com the site is not working.
Do I need to make changes in my DNS Manager of hosting CPanel or DNS Manager of my Domain CPanel?
Also What all Records I need to add ( like A Record or CNAME) to redirect www.subdomain.domain.com to subdomain.domain.com.
I don't want to see www for my subdomain, but only wants to get redirected to subdomain.domain.com.
It doesn't work because www.subdomain.domain.com doesn't exist. You have to add a CNAME record in your zone subdomain.domain.com the same way you've added the host subdomain to domain.com.
You need to register that subdomin too.
Yes - www.subdomain.domain.com is a subdomin of subdomain.domain.com. There is nothing special about the www prefix, as far as the domain system or browsers are concerned.
This helped me out. I hope it helps anyone going through the same thing.
Yes, as you said CNAME record www for customer1.mysite.com will report an error.
To make it working, you should be able to add CNAME record www.customer1 for mysite.com instead of www for customer1.mysite.com - xMudrii https://www.digitalocean.com/community/questions/how-to-configure-subdomains-to-use-www-and-non-www
Create CNAME as sub.domain.
Point to # where sub.domain is your subdomain name and maindomain name.
If you want to add "www" in the subdomain then create the same configuration subdomain and add "www" in that domain.
you required to add both domains name www.subdomain.domain.com and subdomain.domain.com
Say you have a website www.example.com and you want to have a working link like www.service.example.com, then you need to enter the subdomain name www.service (and not service) while setting up the sub-domain.
Preferably set up both sub-domains i.e. www.service and service for users who type in www.service.example.com and service.example.com on their browsers.

Resources