Multisite redirects to homepage when not using www. instead of subset

Hello everyone, I have an issue with an wordpress multisite (using subsites) where the site redirects always redirects to the home page if I don’t use www. before hand.

So for example if user types in it redirects to instead of

Does anyone have any tips how I can solve this problem?

Thanks for taking the time to help!

Have you tried searching for this issue on the site? Often other WordPress users have the same problem. For example, I found this one that seems to closely match what you described -

Hi WebMachine, yes, thanks for the resource but I’m stil stuck at this point…I have tried the codes shared in that thread but site still redirects to the homepage. Currently my htaccess looks like this, what I’m missing?

RewriteEngine on
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^(.*)$$1 [R=301]
# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
# END WordPress

Thanks for taking the time to help!

@brookelustig, I’m not that well versed in .htaccess. Hopefully someone will see your thread who know more about it than I.

@brookelustig: would you like the topic moved to the Server Config forum? You’re more likely to find a .htaccess expert there.

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