[Solved] Caddy support site.land domains?

Hello,
Does Caddy support .land domains? site.land ?

Well I decided to buy the domain and test it out.
Everything seems to be working, although once I go to the site from a browser it will not load and redirects to the port in the caddy file.

C:\Caddy>caddy.exe
Activating privacy features… done.
http://site.land
https://site.land

Going to the website site.land redirects to this.

https://site.land:998/

Below is caddy file.
site.land {

    gzip

    tls email@gmail.com.com

    header / {
        X-Content-Type-Options nosniff
        X-XSS-Protection "1; mode=block"
        Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
    }

    proxy / http://10.0.0.84:998 {
        websocket
        transparent
    }
}

Anyone have any ideas?

You mention a port in the Caddyfile, but I don’t see any port on the site label in the Caddyfile you posted.

Without putting a port on the site label, the only thing I can think of to explain this is if you used -https-port 998 when launching Caddy.

Whitestrake thank you for your time to help me.

I apologize if I was unclear
I have the http listen port to 998 and when I connect to the ubuntu server on my internal network from any computer on 10.0.0.84:998 it goes to my wordpress website as it should.

But when I attempt to go to the “site.land” or “http//:site.land” or “https://site.land” in the browser as in my caddyfile. The address bar redirects to https://site.land:998

site.land does have a valid IP pointing to caddy just like the rest of my domains.

Caddy is running 100% fine w/ all other sites, all of which are .com domains, I cannot find out why this .land one won’t connect.

Caddy isn’t issuing any redirects, based on your Caddyfile.

My guess is that you have configured WordPress to canonically redirect to the hostname on port 998.

If you remove the transparent preset, you might find that the redirects stop as Caddy will stop indicating the hostname requested by the client (which is what WordPress would be trying to correct).

Don’t forget to clear browser caches after making changes, WordPress’ redirects should be permanent otherwise which might cause issues.

Yup, you are correct! That is exactly what was happening, now it’s time for me to dig into wordpress and figure out why this is happening as I do want the browsers to show the site fully secured…
Thanks again! I’m glad this was not a caddy issue.

1 Like

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