تحميل

How to Block all Visitor except yourself via .htaccess file

Updated at
28/09/2022
Views
5236

Introduction:

In today's article, I will guide you, How to Block all Visitor in your website except yourself via ".htaccess" file. So let's get started.

v Firstly go to your cPanel account, and then login.

v After that find out the "Files" section, and then here you can see the "File Manager" option.

v Simply click on it, and then go inside to the public_HTML.

v Now here you need to edit the ".htaccess" file. Basically, this is a Hidden file. So for seeing it, simply click on "settings" option, and then select "Show Hidden Files" option, and then click on "save" button. So now here you can see all hidden files will appear.

v So now select the ".htaccess" file and then right click on it.

v Here you can see the Edit option, So simply click on it, and then again click on "edit" button.

v Now enter the following code inside the file, and don't forget to replace IP address with your IP.

order deny,allow

deny from all

allow from Your_IP

v Once you're done, then click on "Save Changes" button, and then all your Visitors are successfully blocked.

YottaSrc footer

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

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

control panel icon
cPanel

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

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

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

support icon
دعم 24/7/365

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

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

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