1

I want to make a domain point to my Heroku app, so I am trying to create an A record that targets myapp.herokuapp.com.

The problem is that the domain provider requires an IP address, and I cannot find any IP address for my Heroku app. I guess it might be something about Heroku only having dynamic IP addresses (and thus no static IP addresses).

How can I fix this problem? Can I make Heroku use static IP addresses?

2 Answers 2

0

There are heroku apps for that. Take a look at https://devcenter.heroku.com/articles/fixie

1
  • Fixie provides a static IP for outbound requests, not for an application address. Commented Sep 7, 2022 at 16:59
0

Instead of an A record, use a CNAME (alias) record. CNAMEs point to other names. So you don't have to worry about knowing the IP.

www.myapp.com. CNAME myapp.herokuapp.com. 
4
  • You cannot use CNAME records on a zone apex Commented Nov 20, 2018 at 9:27
  • Generally speaking, that's correct. But there are a number of DNS providers that now provide virtual CNAME records that can be used on the zone apex. The server implementations basically resolve the A records at query time and return them as if you had added a normal A record. Commented Nov 20, 2018 at 16:15
  • Some DNS providers use a virtual record type generally called an ALIAS (distinct from CNAME) which acts like CNAME only for A and AAAA record types. No DNS provider should ever treat a CNAME record like this since it's completely incorrect behaviour. It is very specific how a CNAME should be handled, including that it should never be at a zone apex. Commented Nov 20, 2018 at 16:35
  • I modified my example to remove the apex CNAME, because you're right that it's wrong. But like you said, the solution for apex records is still possible depending your your DNS provider. Commented Nov 20, 2018 at 17:10

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.