Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 512573

How to change non-www to non-www wordpress + nginx + Without killing SEO

$
0
0

Replies: 0

hello wp friends. I have done a vast and deep search across the internet on how to change my preference from non-www to www in wordpress, from start when I go in general, in the fields:
Settings> generals
WordPress Address (URL): here add www
Site Address (URL): here add www

All work with www. Seems job, want finished, but then I see everyone doing it via command line through:
/etc/nginx/sites-available/mydomain.com

But every code they teach breaks the website.

Server {
    Listen 80;
    Server_name example.com;
    Return 301 http://www.example.com$request_uri;
}

Server {
    Listen 80;
    Server_name http://www.example.com;
    …
}

This quobra,

Server {
    Server_name domain.com;
    Rewrite ^ (. *) http://www.domain.com$1 permanent;
}

Server {
    Server_name http://www.domain.com;
    #The rest of your configuration goes here #
}

This one also, and several other codes.

And simply, all the codes I’ve got break my website, everyone, I’ve done research all over the world, in several languages, it seems no code works: what should I do to add www on all my websites without harming my SEO?
my life was more easy with apache :'( missed apache. I miss apache :'(

  Thanks all.


Viewing all articles
Browse latest Browse all 512573

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>