How to Redirect subdomain from www to non-www


Redirect subdomain from www to non-www

Redirect subdomain from www to non-www

Guide to Redirect subdomain from www to non-www URL

Today Topic we are Going to see about How to Redirect subdomain from www to non-www URL recently, we launch a web app in Subdomain Extension.

I face some Issues in Sub-Domain URL

  • Website Does not Load on www Format for your visitors
  • Issue in SSL Installation

How to Fix this?

We Must Follow this two Method for fix this issue

  • Create WWW CNAME Record for your Subdomains
  • Redirect subdomain from www to non-www by HTACCESS Method

How to Redirect Subdomain from WWW Prefix URL to NON-WWW?

Crucial Steps to Redirect subdomain from www to non-www with HTACCESS Method

  • Login to your website/blog Control panel (Cloud Users Use FTP to Manage the files)
  • Open the Root Folder which Connected to Subdomain
  • Open the HTACCESS File
  • Copy the Below Code paste it on the HTACCESS File
#Force non-www:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.sub.example.com [NC]
RewriteRule ^(.*)$ http://sub.example.com/$1 [L,R=301]
  • Replace sub.example.com with your Subdomain Link
  • Save the File and Open your Subdomain website www prefix URL It will Automatically redirect to NON-WWW Format

Hope this Method will Help your Redirect subdomain with www to non-www

Here the Other HTACESS Guide for you

 



Was this article helpful?
Thanks!

Your feedback helps us improve Allwebtuts.com