Nginx is redirecting www to non-www

Hi Guys,

I have created a website with ee site create --wpfc. It is working fine, but it always redirects to

Pingdom Tools tells me that my site is taking 300ms just for this useless redirect. How can I set it back to normal? (ie. goes to and goes to, with no redirects)

Config File:

`server {


access_log /var/log/nginx/ rt_cache;
error_log /var/log/nginx/;

root /var/www/;

index index.php index.html index.htm;

include common/wpfc-hhvm.conf;

include common/wpcommon-php7.conf;
include common/locations-php7.conf;
include /var/www/*.conf;


Thanks you

@marcelloc You will need to change the website url from non-www to www in wordpress setting itself. In case if that breaks some elements of the website then you will have to perform a database search and replace. One tool that you can use for such task is wp-cli and the command will be like wp search-replace 'http://non-www url' 'http://www url' <your other parameters>

Let you know if this resolves your issue. Thank you

1 Like

Brilliant! Such a simple fix that I didn’t think of checking. Working now. Thank you very much mate!