ANAME/ALIAS

Connect with other users about what to run on your webhosting (and how to run it) here.
Post Reply
sesame
New to forums
New to forums
Posts: 2
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Mon Jul 06, 2020 2:56 pm

ANAME/ALIAS

Post by sesame »

Hi! Would it be possible to add ANAME / ALIAS to nfoservers?

I wanted to connect my root domain to Heroku, like so:

Domain Record Type DNS Target
────────────────── ─────────── ───────────────────────────────────────────────────────
sesamecall.com ALIAS/ANAME genetic-eggplant-rmrrjiq4gim7y0cu7qrgaj7h.herokudns.com
www.sesamecall.com CNAME safe-whippet-qk56h16hvht3gqp4igfl1py1.herokudns.com

However, currently there's no option for me to create a new ALIAS/ANAME in the domain control panel. Could we add that in?

Need this pretty badly because I need it to deploy my web-app
User avatar
Edge100x
Founder
Founder
Posts: 12945
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: ANAME/ALIAS

Post by Edge100x »

It looks like ANAME/ALIAS is a bit of a hacky way to get around the fact that CNAME records can't be used for a root domain. The hack works by a system checking externally and setting an A record on your behalf, pointing to the IP address of the server.

We can consider adding that hack, but right now, what you'd need to do is either use an A record resolving to the IP address that you need, or use a FORWARD option to a CNAME record.
sesame
New to forums
New to forums
Posts: 2
Joined: Mon Jul 06, 2020 2:56 pm

Re: ANAME/ALIAS

Post by sesame »

Edge100x wrote: Mon Jul 06, 2020 4:23 pm It looks like ANAME/ALIAS is a bit of a hacky way to get around the fact that CNAME records can't be used for a root domain. The hack works by a system checking externally and setting an A record on your behalf, pointing to the IP address of the server.

We can consider adding that hack, but right now, what you'd need to do is either use an A record resolving to the IP address that you need, or use a FORWARD option to a CNAME record.
Thanks for the quick reply!

I was thinking about setting the A record by resolving the IP, but Heroku servers are dynamic and change IPs frequently, so I would need to resolve the IP every day.

I'm not sure if FORWARD account for URL parameters, like if sesamecall.com/foo would forward to www.sesamecall.com/foo.

The hack would be amazing because then I wouldn't have to worry about changing A records often or URL redirection. Would love to see the ANAME/ALIAS feature soon, if you have some time since it would suck to use the workarounds. Anyways, I really love using NFOServers. Been using it ever since middle school and it feels like home. I appreciate all the hard work you've put into NFO!
User avatar
Edge100x
Founder
Founder
Posts: 12945
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: ANAME/ALIAS

Post by Edge100x »

The FORWARD option wouldn't translate the rest of the URL beyond the domain -- it's more for users who mistakenly go to that URL instead of the www. version. It's unusual for users to manually type in URLs beyond the base domain nowadays, so usually that works well. But, if you'd like, you could use mod_rewrite to go one step beyond this, and preserve the entire thing as part of a redirect.

Will add an ANAME/ALIAS feature to my to-do, but it's pretty long!
Post Reply