Redirect apex domain to www using route53 alias record not working - redirect

I had my example.com and www.example.com pointed to the same IP 111.222.333.444 in AWS route53 via A records.
Now I want to redirect example.com to www.example.com .
In route53 I changed example.com A record to an alias record, “Alias to another record in this hosted zone”. Then in the next field I selected www.example.com.
After 24 hours, I can still access http://example.com. It is not redirected to http://www.example.com.

Related

IP Redirect using DNS Server

For my current project I have an ADDS set up. The ADDS also has a DNS Server installed as a role. The name of my ADDS is corp.nikali.lan. I have to use the DNS Server role to redirect.
The IP address of outlook.com should be reachable by typing email.corp.nikali.lan.
At the moment all I have is the basic set-up after downloading the DNS feature. No added records or anything else.
CNAME record - records refer to an alias or redirect for a specific site or subdomain.
Two CNAME fields:
Name
Destination
Common CNAME entries:
Name: www
Destination: #
(or "yourwebsite.com")
Best example :
www.facebook.com and fb.com , some people are using a shortcut word like fb.com , you need to configure in your (NS) Name server , like the example above CNAME entries.

google cloud DNS zone mapping from naked to www URL

I am trying to get my naked domain URL example.com to map to www.example.com. Can someone please give me the step by step procedure to get this working. I can't get it working, no matter what I try
Here is my setup:
1) Domain is registered on GoDaddy, the GoDaddy DNS is pointing to google (ns-cloud-a1.googledomains.com etc..)
2) Website is hosted on google cloud storage bucket www.example.com (domain also verified by google domain)
3) Under google cloud DNS, below is my zone file.
example.com. A 3600
216.239.32.21
216.239.34.21
216.239.36.21
216.239.38.21
example.com. AAAA 3600
2001:4860:4802:32::15
2001:4860:4802:34::15
2001:4860:4802:36::15
2001:4860:4802:38::15
example.com. MX 3600
0 aspmx.l.google.com.
5 alt1.aspmx.l.google.com.
5 alt2.aspmx.l.google.com.
10 alt3.aspmx.l.google.com.
10 alt4.aspmx.l.google.com.
example.com. NS 21600
ns-cloud-a1.googledomains.com.
ns-cloud-a2.googledomains.com.
ns-cloud-a3.googledomains.com.
ns-cloud-a4.googledomains.com.
example.com. SOA 21600
ns-cloud-a1.googledomains.com. cloud-dns-hostmaster.google.com. 1 21600 3600 259200 300
www.example.com. CNAME 3600
c.storage.googleapis.com.
when i go to www.example.com, everything works fine. However when I go to example.com google says "404. That’s an error. The requested URL / was not found on this server. That’s all we know." And if i remove the A and AAAA records, the page just won't load.
All i am looking for is have example.com redirect/forward to www.example.com but cant seem to get it working.
Thank you for your help
You may also redirect the A/AAAA record to example.com. You can do that simultaneously from Cloud DNS (GCP). Pointing A record to www.example.com & example.com

How to do subdomain transfer to other subdomain via WHM

I want to refer one subdomain from another server to another subdomain on other server.
For example.
new.example.com is on SERVER1
dev.mydomain.com is on SERVER2
I need that when customer enter to new.example.com he see the website of dev.mydomain.com
I changed the DNS A records of new.example.com to the IP of dev.mydomain.com, but I need to do something on dev.mydomain.com
What configurations can I do on dev.mydomain via WHM .
Thanks
Instead working with DNS & IP the smart thing you could do is redirect new.example.com to dev.mydomain.com. You can do this by accessing Redirection option under example.com Cpanel account.

Why isn't the www. for my domain working on Github Pages?

My forwarded domain only works on example.com but doesn't work on www.example.com
I have everything setup like i am supposed to. My repository is named user.github.io. I have a cname file with my url example.com.
I forwarded my domain to the ip like below. I am using Name.com as my domain registar.
Now my domain works when i go to example.com but when i type www.example.com it doesn't work. I thought both were supposed to work.
I have tried my cname file with www.example.com and change my dns forwards to www.example.com but then only www.example.com works and example.com doesn't work.
How do i get both to work?

How do I redirect a naked (apex) domain to www using Route 53?

I need to do a 301 redirect from example.com to www.example.com using Route 53 (and S3 if necessary). There are a few solutions for similar problems but they either do not address how to redirect from the apex or they simply don't work.
When I follow the steps here, Route 53 tells me I can't add a CNAME to the apex domain. Therefore, I'm stuck in the mud.
This seems dumb simple but Amazon is making it hard. Any help would be appreciated.
I just managed to figure this out yesterday:
Go to your S3 console at https://console.aws.amazon.com/s3/home and click Create bucket. For Bucket name enter in your naked domain name, e.g. for www.example.com, you would put just example.com. Then click Create.
Click on the name of the new bucket, then click Properties > Static website hosting. On the menu that appears select Redirect requests. For Target bucket or domain enter in the full domain, such as www.example.com. For Protocol put in the desired protocol, http or https. Click Save.
Open your Route 53 hosted zone by navigating to https://console.aws.amazon.com/route53/home and clicking Hosted zones in the menu to the left. Select your domain and click on Create Record Set. Leave the Name area blank, and leave the default type at A - IPv4 address. Select Yes for Alias, and click on the Alias Target textbox. You may have to wait a few moments for the values in the dropdown menu that appears to populate. At this point the menu should contain the S3 Website Endpoint you created in steps 1 and 2. Select it.
Lastly, click Create, and enjoy your new routing set-up!
Try making an alias record instead of CNAME.
Per this answer:
RRSet of type CNAME with DNS name foo.com. is not permitted at apex in zone bar.com
If you are using an Application Load Balancer, they added support for redirects. You point your zone apex at your ELB (using an Alias) and have ELB do the redirect to www.example.com
This seems like a much better solution than setting up a bucket, adding static hosting, redirect, etc.
https://aws.amazon.com/about-aws/whats-new/2018/07/elastic-load-balancing-announces-support-for-redirects-and-fixed-responses-for-application-load-balancer/
The necessary steps are as follows:
Create a new Bucket and call it exactly as your naked domain name (eg: example.com).
In the Bucket properties, select "Static Website Hosting" and make it redirect to your www.example.com domain. Click "save".
Go to your Route53 hosted zone, and create an A record. Mark it as an Alias, and from the dropdown select your recently created bucket.
You're ready.
For those who need to redirect a naked domain example.com to www.example.com
The best practice is to create a new Load Balancer
with Listener on port 80 http that redirect 301 to www.example.com
In case you have https running just add another listener on port 443 that redirect 301 to www.example.com
Once you have finished with the listeners go to
Route 53 > your domain> Create Record
that points your new load balancer with the redirect listeners
record name: example.com
Record Type: A
Alias: Yes
Alias to Application and Load Balancer...
Select your location
Select your new Load Balancer
Save it and wait some minutes and now all request for naked example.com redirect 301 to www.example included for https request.
Note:
If you want to redirect http request to https request you need to do the same procedure but instead of a redirect listener you need to set-up a forward listener to https.