Reverse proxy combining .com and other country TLD

Hi!

Just a general query…

Is there a better way to handle this structure?

domain.com  www.domain.com  domain.com.au  www.domain.com.au {
    ...
    reverse_proxy http://10.1.2.3
} 

The reason I’m asking is that this version gets a little clumsy if domain = a_long_domain_name.

Note: Local customers seem to prefer the country-specific version; international customers the .com version.

Your domains can span multiple lines if you use commas:

example.com,
www.example.com,
example.au,
www.example.au {
	...
}
1 Like

Thanks for the documentation reference. Though it doesn’t seem to be indicated in the documentation, in practice, commas appear to be optional if the addresses are on the same line. Is it best practice to include the commas?

IMO it’s easier to read with a comma and a space than just a space, so I would typically recommend using commas, but it’s purely preference.

I agree the wording there isn’t optimal. I tried to improve it but I couldn’t figure out the right way to word it so it got closed off. If you want to take a crack at it, that’d be cool:

https://github.com/caddyserver/website/pull/61

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.