Single site with multiple domains ( not redirections )

Hi, I’m new on Trellis and have already developed and deployed a site with success and i’m very happy with the workflow that it gaves me. But now I’m a little confused with some configurations that I need to make on my (already in production) site.

Because of some international strategies, it came the need to use an extra domain for the site. At the moment the domain is with the Brazilian ccTLD (example.com.br) and the idea is to use another domain with only the gTLD (example.com) to make it look more “global”. Both domains need to work with the same site, database, etc, without redirecting to the current domain. It seems like i can achieve that easily as i saw in the docs.

The code shows that I can set another domain with it’s redirections. But I didn’t find any more information about this, and I saddly don’t have a staging enviroment to test it right now. My question is if this will work well when reprovising the server with the new entries. What else will I need to do to make this work besides all the configuration to avoid duplicated content in search engines ?

Is it really worth? Or setting a single domain is a better aproach?

Due to many reasons (SEO, maintainability, CORS, system stability/predictability, peace of mind) WordPress site should never be served from multiple domains.

Please also remember that WordPress stores absolute paths for its data (post, media guids etc.) in DB So even if you serve the site under different domain those assets will be served with another one. Obviously you could try rewriting such on the fly but this adds another layer of complexity to your site.

Also depending on configuration many Ajax calls could fail so you risk many plugins to not function correctly.

TLDR : serve site only from one domain, redirect other.

1 Like