2 separate domain names pointing to one host IP

I know there are similar questions in the forum but none seem to relate specifically to my situation. I have two separate domain names for example; ‘mywebsite.com’ & ‘mywebsite.ie’. The website is hosted and the domain name ‘mywebsite.com’ is registered with GoDaddy. Both mywebsite.com & mywebsite.ie nameservers are pointed to Cloudflare without any issues.

I would like the default domain to be ‘mywebsite.ie’ and have ‘mywebsite.com’ redirect to mywebsite.ie with a page rule. I have configured two A records for mywebsite.ie (@) and www pointing to the host servers IP (GoDaddy). But ‘mywebsite.ie’ leads nowhere. Must I use a CNAME record to make ‘mywebsite.ie’ the primary domain not an A record? On the domain ‘mywebsite.com’ there is a CNAME record for www and a A record for mywebsite.com (@).

Any help with this would be much appreciated!

This is the way:

EDIT: As I re-read this post, it sounds like you have the website hosted under the wrong domain, and you want Cloudflare to fix it. This is a hosting issue, as Cloudflare won’t change the requested hostname in transit. You’ll need to see if GoDaddy can have the .com site respond as the .ie site. This might be as simple as a Domain Alias at their end, but there may be some underlying issues with how the site behaves behind the scenes.

1 Like

I have experience with this before. I am hosting two other client websites with A2 Hosting then later moved them over to Cloudways. I was able to direct both of the .ie domain names via Cloudflare DNS records without issue with both hosting providers. The only difference is the site with issues has been attached and live with the .com for several years. Only now am I switched to the .ie. So I will contact GoDaddy and see what they say and report back.

Now would there be any preference for CNAME over A records?

I always prefer “A” records. I think the only advantage of CNAME records is that you wouldn’t have to update its IP address if the site moves; just the “A” record of the hostname it points to. But I don’t mind the extra work of a more precise DNS “A” record.

I am just after chatting with GoDaddy. I had to add the domain as an addon domain (regardless if it is hosted elsewhere) in cPanel of the hosting account. Now I am waiting for it to propagate and see if it works. Supposedly if you have the domain added as a addon domain and those two A records then you’re grand. We shall see.

1 Like