One site, multiple domain names

I’m using the most recent version of Local, on a Mac M1.

This question has been asked many times over the years, and I’m wondering whether there is a solution yet. I can’t find one.

I’m developing a new site, and need to use Polylang to serve different language versions of said site on different domain names.

e.g.

mysite_uk.local
mysite_us.local

…And so on.

Ideally I would edit my hosts file and add entries for each domain, pointing to the IP address of the site, and be done, but I realise Local doesn’t work this way.

Is there a way to achieve this?

Many thanks.

Hi @mrsippy

This isn’t Local specific, but WPBegginner has a great guide on how to set up multilanguage sites here:

If you’re looking to build something like a multisite in Local, we have our own guide here on how to get that started:

Thanks Nick, I have used Polylang many times, I know it well, and my question is Local specific.

Polylang offers the option of delivering different language sites over different domain names. I wish to utilise this functionality, and have two or more different domain names pointing at the site I am developing using Local.

As per my initial post, I would like to be able to access a single Local site via, for example:

mysite_uk.local
mysite_us.local

Polylang will decide which language of the site to serve based on the domain name.

Is this possible, somehow?

Many thanks.

This wouldn’t be possible using Local. You’d need to set this up on a live server or with a webhost. On Local you could create different installs using the different URL names but they would be independent of one another and you wouldn’t be able to “point to the site” since it’s not live.

Thanks for confirming, Nick. I was hoping their might be a way to hack the routes to enable a Local site to field traffic from more than one domain name. Would be a useful feature.

You could try searching the forums here to see if other users have attempted this in the past and have some workarounds posted. Otherwise, you’re always welcome to create a feature request for others to vote, comment, or follow to add for consideration on a future rollout!

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