Instructions To Direct Www Domain Names To Non-www Https Protocol By File .Htaccess

October 3, 2022 30hotness 0likes 0comments

The https protocol is increasingly popular. It makes your website more secure. and google appreciates that the website has https settings. But if you do not know how to install it, it will harm your website. Make the keyword drop seriously!

Always remember that Google DOES NOT LIKE SPAM. Therefore, the fact that two websites are identical in content will cause serious confusion. The first is getting the wrong links. After that, the keywords on both websites dropped.

With 1 domain name, at least you have 4 websites without even knowing it. In this example is the domain name

So you have to direct (direct) all 4 of these "websites" into 1.

There are many ways to do this. However, in this article, Hostagy would like to guide you in the simplest way. It's Direct all about
The advantage of this option is that the website has https protocol. Make sure you buy an ssl certificate for https protocol. If not, please refer to the article direct www - non-www (http protocol)

  • First, login to Hosting or manage Files via FTP.
  • Find and edit the .htacess file (usually located in public_html)

Instructions to direct www domain name to non-www https protocol with .htaccess file

Add the following: (Replace with your domain name)

RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}:443%{REQUEST_URI} [END]

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule ^(.*)$$1 [L,R=301]

Then save.

Check by visiting all these links (,, everything is directed to, we've done it

Best Domain - Hosting - VPS Provider in Vietnam

As a unit in the top 3 in the field of website hosting services in Vietnam, Hosting Vietnam is considered as the place with cheap hosting and always receive many recommendations from the computer forum about where to buy a good host. From only 40,000 VND/month, users have immediately got themselves a host to freely study, research or run a demo website… Besides, Hosting Viet is also a pioneer in cloud computing technology. cloud hosting), package server rental with unlimited bandwidth.
Hosting Vietnam has a variety of service packages, besides super cheap packages of 40,000 VND/month, the provider also has cheap vps quality for many different business groups. These packages always meet the storage needs, accessing tens of thousands of people every day.
In addition, with professional customer care service, a team of highly qualified technicians will quickly support and handle arising problems. From there, helping users get a smooth and enjoyable experience.
Thus, through the article on Hosting Viet has helped you get more useful information! Hope you will be able to equip yourself with many more knowledge that we have shared! If you find this article useful, please subscribe to follow the latest information from Hosting Viet. Good luck!

Tag: www to non-www, direct domain, www to non-www https, https www to non-www, www to non-www https, www to non-www .htaccess, .htaccess https

Source link


This person is a lazy dog and has left nothing