تحميل

How to forcefully redirect your website into HTTPS

Updated at
14/09/2022
Views
2282

Introduction:

In today's article, I will guide you, How to forcefully redirect your website into HTTPS. Basically, there are two methods to redirect your website into HTTPS.

v First method:

·       Login to your cPanel account and then find out the "Domains" section.

·       After that, click on this Domain's option.

·       On this page, Just enable this "Force HTTPS Redirect" option, and then you can see the website is successfully redirected to HTTPS.

v Second method:

·       Go to your "File Manager", and then go inside to the public_html.

·       Now there is a Hidden file, named ".htaccess". So for seeing it, click on "settings" option, and then select "Show Hidden Files" option, and then click on "save" button.

·       Now here you can see all hidden files will appear.

·       Select ".htaccess" file and then right click on it.

·       Here you can see the "Edit" option, So simply click on it, and then popup box will appear.

·       Again, click on  "edit" button, and then you will be redirected.

·       So now enter the following code inside this file, and don't forget to replace the domain.

RewriteEngine On

RewriteCond %{SERVER_PORT} 80

RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

·       Once you're done, then click on "Save" Changes button.

·       Now if you search your website, then it will directly redirect to HTTPS, and your website working flawlessly.

YottaSrc footer

لماذا تختارنا؟

أفضل الأسعار, تخزين SSD سريع و دعم فني
24/7 حقيقي

control panel icon
cPanel

إدارة موقعك من خلال CPanel بأحدث إصدار

security icon
سريع وموثوق وآمن

ضمان وقت تشغيل بنسبة 99.8٪.
لذا ركز على عملك!

support icon
دعم 24/7/365

ليلاً أو نهارًا ، مطر أو شمس ،
فريقنا هنا من أجلك!

cloud backup icon
نسخ احتياطي يومي

نسخ احتياطي يومي وأسبوعي.
ملفاتك آمنة!