How to Redirect subdomain from www to non-www

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

Comments