If you have enabled WordPress Multisite on your domain and with at name such as www.domain.com then there is a problem that the non-WWW version (domain.com) will take you to a sign up page to add a new site to your Multisite install.
This is clearly not what we want and it arises due to the problem that technically WWW and non-WWW are different and hence this problem occurs.
I have a quite easy fix for this, you just need to edit a value in the database and everything would be fine. The non-WWW version will redirect to the WWW version.
Open your database in phpMyAdmin and go to wp_blogs table (as per what your WordPress table prefix is)
Look for the entry www.domain.com and edit it.
Change it to domain.com from www.domain.com and click on Go to save.
Now when you will try to access the non-WWW version of your domain, it will redirect to the WWW version of the domain. Good for SEO too.
Let me know if you face any issues.
you r very pound thank
Thanks for sharing this great tip.
can’t this be set from the general settings? where you set the blog address? or it’s different with multiblog sites?
I don’t think so as its a problem arises after installation when you are using www version of domain as main site
The posts like this one makes the Internet worth our time. Thanks
just the answer i was looking for, thnx!
Amazing, thank you so much. This not only fixed the problem with redirecting non www to www on multisite installation, but also fixed the problem that the subdomains were showing an error page of cannot connect.
Thanks so much, you fixed two problems in my multisite, with one very simple fix.
Happy to help! 🙂
Thanks for the fix. This will also forward yourdomain.com/somepost to the www-version. MUCH better than fixing this with .htaccess or redirection plugins.