Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
you can serve a 301, but not via DNS per se.
You make sub.domain.com point to an IP via A, AAAA or CNAME entry, and the webserver that receives a request checks the host header.
(nginx: `server_name sub.domain.com;`)
You then redirect the user to that other page.
location / {
return 301 https://otherdomain.com/blablabla;
} -
C0D4681385y@kescherRant see that last section
I agree this would be the ideal, but I don't have a month to wait for someone else to finally get to it.
I don't control originating domains servers so a backlog ticket that never gets actioned is worst case scenario. -
-
C0D4681385y@kescherRant haha, I could set this as "world will end if not done" and it'll still be backlogged.
-
Why can't you use your subdomain for this:
sub.domain/soweirdfile
that points to the same resource as the 301 target? otherwise, setup your own web server for that subdomain, and serve the 301 from there, until someone gets around to do the other task. -
bnjns865yYou could also use an ALB with a fixed response, and point the DNS entry to that. But that's way more expensive than an S3 bucket.
As far as I'm aware, you can't do a redirect straight from DNS - there has to be something intelligent in there. -
hjk10157315yActually route53 is quite intelligent DNS but the OP asks for a HTTP response. Never gonna happen in DNS. I hate it when providers confuse clients by adding HTTP redirects to the "DNS" config panel.
-
vane112805yhttp://otherdomain.com/folder”ain.com with <meta http-equiv=“refresh” content=“0;url=http://otherdomain.com/folder” />
-
You obviously can't serve 301 over DNS because one's HTTP and the other is DNS. If you want sub.domain.com to be a reflection of otherdomain.com, then just use a round Robin DNS entry.
If you want actual forwarding, i think you have to do it via HTTP. Round Robin is basically HTTP passthrough if you've ever used traditional application load balancers.
Let me know if route 53 can even do round Robin dns.
Related Rants
-
shauryachats9I hate those fucking sites which make you login first and then redirect to their home page. FOR FUCK'S SAKE, ...
-
huszerldani30I am working on another developer's PHP code, and I found a new way that he done the redirect after the login ...
-
amkherad1When I call another dev and he give me another dev's number and the second one give me another and that one gi...
!rant
Anyone here experienced with Route53?
I have a small issue I'm trying to think through on how to achieve with minimum effort and maintenance, essentially set once and walk away and never care about it again solution.
Basically what I have is:
sub.domain.com
and I need to get it to redirect over to
otherdomain.com/folderToGetTo/
Using a 301 would be ideal but how for the life of me do I go about serving a 301 redirect over a dns entry - short answer is I can't unless I'm missing something!
Both domains are owned by the same company so no issue in hijacking a subdomain... well besides internal politics but that's just another day 😏
First thoughts include setting up a S3 bucket with hosting and forcing the dns to that and then, redirect out of the bucket... seems overkill but will work.
Hoping to find a smaller solution that I don't have to justify a S3 bucket being used for a single file - audits suck alright🤷♂️
Oh and setting up a redirect at the originating domain will take longer then it's worth to setup and get approvals for so not worth the effort internally.
Yes I will accept "fuck off @C0D4" as an answer.
question
popcorn supplied
c0d4 has a question
redirect
why can't we do it like normal people
route53