Disable Directory Listing

WordPress Security: Secure Your Site Against Hackers Keeping Software Up-to-Date and Understanding Basic "Webroot Hygiene"
3 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$69.99
List Price:  $99.99
You save:  $30
€59.72
List Price:  €85.31
You save:  €25.59
£51.75
List Price:  £73.93
You save:  £22.18
CA$96.16
List Price:  CA$137.38
You save:  CA$41.21
A$106.74
List Price:  A$152.49
You save:  A$45.75
S$89.82
List Price:  S$128.32
You save:  S$38.50
HK$545.70
List Price:  HK$779.61
You save:  HK$233.90
CHF 55.94
List Price:  CHF 79.92
You save:  CHF 23.98
NOK kr701.04
List Price:  NOK kr1,001.53
You save:  NOK kr300.49
DKK kr445.79
List Price:  DKK kr636.88
You save:  DKK kr191.08
NZ$118.48
List Price:  NZ$169.27
You save:  NZ$50.78
د.إ257.03
List Price:  د.إ367.21
You save:  د.إ110.17
৳8,490.36
List Price:  ৳12,129.61
You save:  ৳3,639.24
₹6,174.40
List Price:  ₹8,820.96
You save:  ₹2,646.55
RM295.70
List Price:  RM422.45
You save:  RM126.75
₦107,179.18
List Price:  ₦153,119.68
You save:  ₦45,940.50
₨19,807.80
List Price:  ₨28,298.07
You save:  ₨8,490.27
฿2,260.78
List Price:  ฿3,229.82
You save:  ฿969.04
₺2,877.44
List Price:  ₺4,110.80
You save:  ₺1,233.36
B$381.30
List Price:  B$544.74
You save:  B$163.44
R1,230.49
List Price:  R1,757.93
You save:  R527.43
Лв116.70
List Price:  Лв166.73
You save:  Лв50.02
₩97,516.43
List Price:  ₩139,315.16
You save:  ₩41,798.72
₪234.46
List Price:  ₪334.96
You save:  ₪100.49
₱4,002.93
List Price:  ₱5,718.72
You save:  ₱1,715.78
¥10,297.66
List Price:  ¥14,711.57
You save:  ¥4,413.91
MX$1,302.44
List Price:  MX$1,860.71
You save:  MX$558.27
QR254.47
List Price:  QR363.54
You save:  QR109.07
P939.97
List Price:  P1,342.87
You save:  P402.90
KSh9,042.70
List Price:  KSh12,918.70
You save:  KSh3,876
E£3,400.73
List Price:  E£4,858.40
You save:  E£1,457.66
ብር9,944.74
List Price:  ብር14,207.39
You save:  ብር4,262.64
Kz63,827.73
List Price:  Kz91,186.38
You save:  Kz27,358.65
CLP$67,951.45
List Price:  CLP$97,077.66
You save:  CLP$29,126.21
CN¥499.08
List Price:  CN¥713
You save:  CN¥213.92
RD$4,402.12
List Price:  RD$6,289.01
You save:  RD$1,886.89
DA9,080.10
List Price:  DA12,972.12
You save:  DA3,892.02
FJ$157.56
List Price:  FJ$225.10
You save:  FJ$67.53
Q535.16
List Price:  Q764.55
You save:  Q229.39
GY$14,601.08
List Price:  GY$20,859.58
You save:  GY$6,258.50
ISK kr8,563.97
List Price:  ISK kr12,234.77
You save:  ISK kr3,670.80
DH629.41
List Price:  DH899.20
You save:  DH269.78
L1,163.88
List Price:  L1,662.76
You save:  L498.88
ден3,677.36
List Price:  ден5,253.59
You save:  ден1,576.23
MOP$560.60
List Price:  MOP$800.90
You save:  MOP$240.29
N$1,239.36
List Price:  N$1,770.60
You save:  N$531.23
C$2,572.41
List Price:  C$3,675.04
You save:  C$1,102.62
रु9,854.29
List Price:  रु14,078.16
You save:  रु4,223.87
S/247.11
List Price:  S/353.04
You save:  S/105.92
K294.61
List Price:  K420.89
You save:  K126.27
SAR262.64
List Price:  SAR375.22
You save:  SAR112.57
ZK1,646.70
List Price:  ZK2,352.53
You save:  ZK705.83
L302.89
List Price:  L432.72
You save:  L129.83
Kč1,459.38
List Price:  Kč2,084.93
You save:  Kč625.54
Ft23,602.69
List Price:  Ft33,719.57
You save:  Ft10,116.88
SEK kr658.51
List Price:  SEK kr940.77
You save:  SEK kr282.25
ARS$94,275.73
List Price:  ARS$134,685.39
You save:  ARS$40,409.65
Bs482.45
List Price:  Bs689.25
You save:  Bs206.79
COP$280,693.47
List Price:  COP$401,007.86
You save:  COP$120,314.38
₡35,283.96
List Price:  ₡50,407.82
You save:  ₡15,123.85
L1,833.31
List Price:  L2,619.12
You save:  L785.81
₲504,785.11
List Price:  ₲721,152.50
You save:  ₲216,367.38
$U2,800.03
List Price:  $U4,000.21
You save:  $U1,200.18
zł254.13
List Price:  zł363.06
You save:  zł108.93
Already have an account? Log In

Transcript

Another thing about directories and files on your website is that you must make sure that you don't list any directories. You don't want anyone going to a folder in your site and seeing the contents of that folder, you need to make sure that you disable directory browsing on your website, my directory browsing was enabled. That means anyone who could guess that there was a folder on my website would then go to that folders address, and then see the directory listed. See all the files listed on that folder. Very dangerous. You don't want that enabled.

And in order to disable directory listing on your server, just google disable directory listing and the first thing that pops up is this line from the site wizard. Very easy how you proceed Have a directory listing of your website with.ht access. This is only if you have an Apache web server, it's very likely that you are using an Apache web server using Linux if you are hosting a WordPress site, so in here if you scroll down, that is what you need to put in the ht access file on your website and I'll just show you where to find that now. Okay, so we've logged into the cPanel. You can do this by an FTP client if you wish like file Zilla, but we'll go into file manager and then we'll go into public HTML and this is the root of your website. So this is where all your familiar WordPress files are.

There they are the three WP directories WP admin WP content WP includes, and all the WP hyphen PHP files and remember to Have a look. If there's any files or folders here that you don't recognize, then you need to look into that. But there's your.ht access file. Remember, if you can't see it, go to settings, and make sure Show Hidden dot files is checked there. So we'll edit that and add that line in there, options indexes. So we can disable directory listing on this site.

Remember, always make sure that there is a return or an enter. After those two lines don't make that just the end of the file. So save changes. And then we can put a folder and call it test 123 create that folder. Have a look at the websites. Navigate towards that folder and it's giving us a full Four page.

That's one way of disabling directory listing on your websites. If you're unsure, contact your host and they will be able to tell you the best way in order to disable directory listing but please disable directory listing on your website.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.