"Redirected too many times" and "An A, AAAA, or CNAME record with that host already exists."
I bought a new custom domain name "rython.dev" and I'm trying to change my website's existing custom domain name to the new one.
1. I'm unable to add a CNAME record to the DNS settings because "An A, AAAA, or CNAME record with that host already exists" even though I'm positive there isn't?
2. When I try to hop on "https://rython.dev" or with a "www" subdomain, it gives me an error "Redirected too many times"
60 Replies
I changed my files in my repository (astro.config.mjs) and I'm not sure if I should have
./public/CNAME
with the content www.rython.dev
Update: deleted A records with "www" and I'm able to add the CNAME
Issue #2 still persists
this is what happens when I run wget command
as of right now, github is experiencing issues and I believe that has affected it
(I'm using Github Pages)
Under SSL/TLS -> Overview, change your SSL/TLS Mode to "Full (Strict)"
Magic link: https://dash.cloudflare.com/?to=/:account/:zone/ssl-tls
thanks, I believe that helped
But for now, the Github Actions aren't successfully building and I suspect that it's on Github's side and not mine
haha yea
I'll continue this tomorrow
now I understood why I couldn't create CNAME, it's not cuz of the property but because of the existing "www" A records
was wondering why I was seeing 500s all over the place and a merged pr just warped back in time... now it makes sense 😄
XD
Github Pages build and deployment were successful, now I'm not sure why this isn't working
oh wait. what
do I need to pay to solve this issue?
What happens if you disable proxy status for the domain? What is the SSL certificate that is shown?
like this?
or just undo this step?
oh wait I just changed from "Full Strict" to Full and now the domain works
yay!
changed back to this
Full is not secure
Should only ever use Full (Strict)
ah
It should work without paying though, something else might be broken or need a sec
Wait I’m confused. Which domain are you trying to use? The www is the CNAME record you have but the custom GitHub domain is for the apex domain.
I'm trying to use rython.dev?
Then you need the CNAME for the apex to point to the GitHub one and have it configured in GitHub settings. Right now you have a custom domain in GitHub of rython.dev but a DNS record of www.rython.dev pointing to that.
so I need to change the CNAME record?
ehh that shouldn't really matter, he's using the A records Github says you can use for apex, and has a redirect on www
after changing from Full to Full Strict, it seems like the domain continues to work?
Your screenshot shows that
it doesn't for me, probably cache
okay thanks
yeah, so I figured it's only an SSL certificate error?
If you switched it to a CNAME on your apex it should work though, because Cloudflare is ok if the cert matches the CNAME target
otherwise it's probably because you added it when you had redirects broken, could try enabing/disabling in Github
what should I enable/disable?
Remove and readd the Custom Domain, or maybe just enforce https, it just needs to realize that it is enable to configure https now
ok, will do 👍
If it helps to explain, Github is serving the github.io certificate for your site right now, because it doesn't have one issued for it specifically
curl --resolve rython.dev:443:185.199.111.153 https://rython.dev/ -vvv -k -o /dev/null ... * ALPN: server accepted h2 * Server certificate: * subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=*.github.io * start date: Feb 21 00:00:00 2023 GMT * expire date: Mar 20 23:59:59 2024 GMT * issuer: C=US; O=DigiCert Inc; CN=DigiCert TLS RSA SHA256 2020 CA1 * SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway. } [5 bytes data]Full Works because it accepts any certificate at all, which is why it's insecure it would be best if you could get Github to issue you an actual valid certificate for your site.
should I change the code for Github Actions to host it on a default github url? like make the website work with
https://<username>.github.io/...
I don't think that matters as long as it's available through your custom domain
same error
Github still has the same unavailable message?
yes
wonder if it's cached or it did check again and fail, maybe because of proxy? I thought it didn't care
well we have the fallback solution then, delete the A records and create a cname record like your www
create another cname record?
yes, you'll have to delete the 4 A Records first though, that you have for rython.dev
then create
CNAME
@
liyunze-coding.github.io
Proxied
what's next?
Your website works
wow didn't expect that to work
Cloudflare trusts the certificate since it knows the target is github.io, which matches the cname target
thanks!
It wouldn't work if you disabled proxy, which is why getting Github to actually issue you a cert would have been better
but if you intend to use CF it doesn't really matter
thanks @Chaika ! really appreciate it
that fixed my issue after moving subdomains to tunnels and domain to pages, appreciated
Good Day Team , not sure if I’m in the correct thread, please advise. Cloudflare is listed as my DNS host and in an attempt to create a mail account, I’ve been asked to add a CNAME .txt to the host server. I’m not familiar with the Cloudflare platform and would appreciate a bit of direction on this.
Please make your own thread.
Thank you and humble Apologies