vrod

vrod

Does Gigalixir have a static IP address for DNS A (or AAAA) records? CNAME for apex/root domain?

I am having troubles to get my custom domain working with Gigalixir because of DNS. Gigalixir can have a custom domain: you must create a CNAME record and point it to gigalixirdns.com, something like

www.example.com ---> www.example.com.gigalixirdns.com.

See Gigalixir Docs

However, RFC rules says that a root level (apex level) CNAME is not allowed. GoDaddy does not allow this – so GoDaddy is not a good registrar for Gigalixir (maybe not a good registrar for anything). But some registrars like namecheap.com allows for an ALIAS record type that you can use for the root (non-www) version of your domain to solve this problem. Domains registered with Namecheap.com work with Gigalixir.

But for many (most?) registrars www.example.com works great! But example.com fails.

I tried AWS Route 53, and I am so confused. It says something about “alias” record, but it does not allow me to define an alias the same way as Namecheap… AWS is so confusing. I think what I want to do is very VERY common: you want www.example.com and example.com to point to your web server. Doesn’t almost everybody want this?

I think maybe Route 53 can make an “alias” only if there is an A record already… but if there is an A record, then I do not understand why I would need a CNAME or an ALIAS at all. Maybe not?

So my question is does Gigalixir have a static IP address that I can use in a DNS A record (or AAAA record for ipv6). Or is a static IP address for DNS not allowed in Gigalixir? Does someone have a custom domain working for both www and root/apex domain using Route 53?

Thank you for any informations.

Most Liked

jesse

jesse

We (gigalixir) don’t usually recommend using an A record just on the off chance that we are forced into changing our ip addresses, but we’ve never had to so far and don’t see any real reason why we ever would so I think it’s relatively safe to use an A record if you have to. Just use dig or https://toolbox.googleapps.com/apps/dig/ and find the ip address of your example.com.gigalixirdns.com record and use that. Let me know if you run into any problems.

To be honest, though, what I would do is set up a redirect from the apex to www as I think most DNS providers support that sort of thing and it’s good practice to have a canonical hostname.

vrod

vrod

Thank you for the information!

Unfortunately, setting up a redirect for the apex/root domain is not simple, and many (most?) registrars do not allow it: GoDaddy and Route53 specifically do not allow this and I think they are maybe the most popular registrars?

I have a follow up question – when you say to use dig – I can see something like this:

; <<>> DiG 9.10.6 <<>> example.com.gigalixirdns.com.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63176
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;example.com.gigalixirdns.com.	IN	A

;; ANSWER SECTION:
example.com.gigalixirdns.com. 60 IN	CNAME	us-east-1.aws.tls.gigalixir.com.
us-east-1.aws.tls.gigalixir.com. 32 IN	CNAME	abc-f88f3c48c2438c19.elb.us-east-1.amazonaws.com.
abc-f88f3c48c2438c19.elb.us-east-1.amazonaws.com. 32 IN A 34.196.244.143
abc-f88f3c48c2438c19.elb.us-east-1.amazonaws.com. 32 IN A 3.212.80.121

;; Query time: 95 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Thu Aug 20 17:26:37 EDT 2020
;; MSG SIZE  rcvd: 219

Do you mean I should create DNS A records for my example.com domain for both the IP addresses listed under A records? 34.196.244.143 and 3.212.80.121 in this example. is that correct?

Again, thank you! Sorry for my not understanding.

jesse

jesse

Ohh I’m so sorry. I forgot that if you’ve chosen AWS, there really is no way to use an A record. On GCP, you’d be right and there’d only be one ip address there in dig. But with elastic load balancer a the number of IP addresses is dynamic and perhaps not stable.

Where Next?

Popular in Questions Top

JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
beno
I will often find my self writing things similar to: case some_value do nil -&gt; something() "" -&gt; something() _ -&gt; someth...
New
Mooodi
Given a string, how can I get access to its character by index? Enum.at("my_string", 2) doesn't work. Or rather, not char, but a substr...
New

Other popular topics Top

yurko
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

We're in Beta

About us Mission Statement