2

I have a main site - something.com

Some other domains have A records in the DNS to point to the one above.

something.co

something.nl

I have this in my wp-config:

/*
 * Handle multi domain into single instance of wordpress installation
 */

define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST']);
define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST']);

They both keep still going to the .com version if i try and go to their root.

If I go to a child page and then click on any other child page it is fine, unless i try and click home

https://something.nl/en/products/

I am not sure what else to try, and I can't find anything on Google to help.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
  • So basically you want multiple domains (fleetcomplete.com, fleetcomplete.co, fleetcomplete.nl) to go to the same Wordpress site? – Adam May 04 '17 at 21:31
  • It looks like you're using the solution (Google "Mapping Multiple Domains into Single Instance of WordPress"). Can you check inside the WordPress Settings -> General to see if WordPress Address (URL) and Site Address (URL) are disabled? Maybe your domain is set somewhere else in the database and it is defaulting to that. – Adam May 04 '17 at 21:35
  • Hi Adam, They are disabled in Settings > General. The only other place i can see them in the DB is in the _options table – Joana Ashford May 04 '17 at 21:38
  • httacess might be the culprit. Looks like you're forwarding all traffic ("(.*)$") to the ".com" address. – Adam May 04 '17 at 21:59
  • I removed it, but still no luck :-( – Joana Ashford May 04 '17 at 22:15
  • Mapping multiple domains to the same website is usually not a good idea. This will reduce the SEO because search engines will penalize you for duplicate content. You should pick one domain as your canonical domain and redirect the others to that one. – Emmanuel Mathi-Amorim Jul 11 '17 at 14:53

1 Answers1

2

This was the answer i needed :-) The Polylang plugin was causing the issue.

define('PLL_CACHE_HOME_URL', false);