Problem with DNS (CNAME record)

Good morning,

I’m having a problem, I want to do a redirection from carlosxavier.pt to www.carlosxavier.pt. I consult the ChatGPT and it said to do add a CNAME record with the hostname “carlosxavier.pt” and the value “www.carlosxavier.pt”. I tried various times but it seems i’m having a problem as you can see in the print screen.

Can someone help me please??

I’m wondering, did you clarify to ChatGPT that you would be using Cloudflare?

Creating a CNAME record on the apex domain (e.g. the naked domain), “carlosxavier.pt” would be against the DNS standards, and not allowed.

For all the wrong doings that ChatGPT do, I would personally suggest you (and anyone else) to refrain from using things such as ChatGPT to “assist with managing things”.

Cloudflare (and some other providers) can however do some special magic that allows CNAME-similar functionality on the apex domain.

CNAME can, as the error message says, not exist together with any other records.

At the bottom of your screenshot, you’re showing an A record pointing to an 185.x.x.x IP address.

At least that one, is in conflict with what you are trying to do.

Take advantage over Cloudflare, rather than letting your own server handle it.

Delete the A and AAAA records you have with the Name being carlosxavier.pt.

Add:

Type: AAAA
Name: @, or carlosxavier.pt
IPv6 address: 100::
Proxy status: :orange: Proxied:

Set up the desired redirect on:

https://dash.cloudflare.com/?to=/:account/:zone/rules/redirect-rules

And select Deploy.

Bonus: Now, Cloudflare’s edge will take care of the redirection for you, without bothering your own server each time someone needs to get redirected.

2 Likes

Hello again,

By chance I said to ChatGPT that i’m using the Cloudflare.

But now it is not important, your solution work. Thank you very much!

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.