Subdomain in my Wordpress site redirects to the main site

  • Answered
I installed Wordpress multisite and added several sites as subdomains. I already configured the wildcard subdomain in cPanel. But now when I try to access the site on the subdomain I get redirected to the main site. This also happens when I try to access, I get redirected to instead. So how to fix this issue?
Hello, Sorry for the problem with your webmail getting re-directed to the main domain. This issue has to do with the re-direct being used by WordPress. To fix this you would need to URL rewrite that redirects to the proper URL. To do this, you edit the .htaccess file found in the root of your WordPress multisite installation file and add an exception for that URL that would look something like this:
RewriteCond %{HTTP_HOST} ^ [NC,OR]
RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule ^(.*)$ [L,R=301,NC]
Of course the domain "" would be replaced with your domain name. You could also tell people to directly type in The "2095" is the port for accessing webmail on the web server. The rule needs to go at the BEGINNING of your re-write rules. Safest place would be directly under the "RewriteEngine on" statement. I hope this helps to answer your question, please let us know if you require any further assistance. Regards, Arnel C.