Web Burble   How_To_Build_A_Website

 

How To Create A WordPress Website

speed up outlook

go tour thailand


website access

This section describes how to control access by visitors to your website and assumes your website is using the most common type of web server which is Apache, running on a Linux type system and the hosting plan includes cPanel.

Otherwise you may possibly be using a Microsoft IIS website which works completely differently or a very cheap hosting plan (website builder) that does not have access to control the web server, or your "shared" web server.

The  .htaccess  file is in the root directory (folder) of your website. This file controls how your website is accessed by visitors. Your cPanel will also have security functions for controlling access whereby you do not need to manually add script to the  .htaccess  file. Because this file is telling the web server what to do,  it is important to have a backup copy and be aware any misconfiguration can "break" your website.

 

Making it all Visitor Friendly

Search Engine Friendly (SEF) websites allow a Search Bot to crawl your website content and create an index of content for words, phrases and images. Some well known search bots are GoogleBot and BingBot. When humans use Google or Bing to search the Internet, hopefully your website will be in the list. So, creating SEF content is one important component in website design. Many content management systems such as Joomla! make this very easy to configure because it will insert the required code into your  .htaccess  file automatically with very little configuration, you just need to turn SEF on.

 

Increasing Security by Hardening your Website

Making it difficult or nearly impossible for your website to be "hacked" can be helped by adding some code to your .htaccess  file.

Joomla! and other content management systems can automatically add rules to help block some common exploits. Code is added when the CMS is initially installed.

RewriteEngine On

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.

 

 Some other precautions can be added. Normally the system files would not be accessible.

#Prevent viewing of  .htaccess  file
<Files .htaccess>
 order allow,deny
 deny from all
</Files>

#Deny access to configuration file <FilesMatch "configuration.php"> Order allow,deny Deny from all </FilesMatch> #Deny hacker to put or delete files to web server <Limit PUT DELETE> Order allow,deny Deny from all </Limit>

 

This code helps prevent unintentional access to important files that may have been accidentally left on the website and not moved or deleted. These files may have been left by some text or html editors and can pose a huge security issue if someone accesses the file.

#Block access to backup and source files
<FilesMatch "(\.(bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$">
  Order allow,deny
  Deny from all
  Satisfy All
</FilesMatch>

 

Restricting Access from Unwanted Visitors

 Creating a "deny" list of servers from around the world can help block hackers and spammers. They will receive a page not found error or denied error when attempting to access your website.

These lists should be updated regularly as more are added and some may have been removed. An excellent website to get these lists is  http://www.wizcrafts.net/htaccess-blocklists.html

Below is a partial sample only.

<Files *>
order deny,allow
# Russia (RU), Ukraine (UA), Belarus (BY), Bulgaria (BG), Czech Republic (CZ), Romania (RO),
# Latvia (LV), Estonia (EE), Kazakstan (KZ), Moldavia/Moldova (MD), Poland (PL), Serbia (RS),
# Siberia, Slovakia (SK), Slovenia (SL) deny from 2.72.0.0/13 2.92.0.0/14 2.132.0.0/14 5.1.0.0/19 5.8.36.0/22 5.16.0.0/14 5.34.56.0/22 5.39.216.128/25 5.60.0.0/16 5.76.112.0/20 5.101.32.0/19 5.101.64.0/19
# Hungary (HU) deny from 46.107.0.0/16 92.249.128.0/17 94.21.90.0/24 94.125.176.0/22 145.236.0.0/16 193.178.119.0/24 194.38.96.0/19 # Poland (PL) deny from 31.6.70.0/23 78.8.0.0/14 95.160.16.0/22 # Turkey (TR): web hosts and Turk Telekom customers - scammers, spammers, phishing websites and server script exploiters: deny from 31.192.208.0/21 31.206.0.0/16 31.210.32.0/19 31.210.64.0/18 31.223.0.0/17 37.230.104.0/21 46.1.0.0/16 46.45.136.0/21 46.45.184.0/21 46.196.0.0/16 # France deny from 37.59.0.0/16 62.210.0.0/16 91.121.0.0/16 212.129.0.0/18 # German (DE) ISPs used by hackers and spammers including 1&1internet DE, Deutsche Telekom AG, NetDirekt and Schlund & Partners deny from 31.214.128.0/19 77.176.0.0/12 78.46.0.0/15 78.159.96.0/19 79.143.176.0/20 79.192.0.0/10 80.128.0.0/11 82.165.128.0/20 83.138.64.0/21 83.169.40.0/21 84.200.208.0/20 # Iran (IR) deny from 2.144.0.0/15 2.176.0.0/12 5.52.0.0/16 5.120.0.0/13 5.200.64.0/18 5.200.128.0/17 5.220.0.0/14 5.232.0.0/13 31.184.128.0/18 37.254.0.0/15 46.100.0.0/16 46.164.64.0/18

</Files>

 



© 2018 WebBurble.Com. All Rights Reserved.