I have a domain zyx.com and I would like to point it to the page in abc.com/cba. Is there a way in Route 53 to do this with either a CNAME or A record? Both of the domains are on AWS, but when I do a CNAME record pointing zyx.com to abc.com/cba, zyx.com points to abc.com instead of the subfolder of the domain.
Thank you in advance.
I created a CNAME record pointing zyx.com to abc.com/cba. I also created an A record for the same. Either way it does not take
CodePudding user response:
You cannot use DNS to redirect to a specific page on the same domain or any other domain. Redirects occur within HTTP, not DNS.
Instead, on AWS, you can use an S3 bucket with static web hosting to configure a redirect. To redirect requests for a bucket website endpoint:
Open the Amazon S3 console at https://console.aws.amazon.com/s3/.
Under Buckets, choose the name of the bucket that you want to redirect requests from (for example, www.example.com).
Choose Properties. 4.Under Static website hosting, choose Edit.
Choose Redirect requests for an object.
In the Host name box, enter the website endpoint for your bucket or your custom domain. For example, if you are redirecting to a root domain address, you would enter example.com.
For Protocol, choose the protocol for the redirected requests (none, http, or https). If you do not specify a protocol, the default option is none.
Choose Save changes.
For more details, refer to the docs.