IP Blocking

Blocking of IP in the cPanel commonly happens shared hosting servers and cPanel VPSs. It’s caused by the following;

I.        cPanel server being used to host large corporate mail accounts or multiple websites with constant updates.

II.        While using shared servers, it’s normally caused by incorrect logins or  over-zealous web application firewall settings.

III.        A website update is interpreted as a hack attempt by the web application firewall(Mod-security)

IV.        Web owner failed to successfully authenticate in a mail, web, FTP or cPanel services interface multiple times leading the firewall to think it’s a brute force attempt

V.        Web owner’s mail client has a very low ‘mail check interval’, causing a denial of service attack like behavior, especially if many users are accessing mail through a common connection.

The following are steps on how to block IP;

I.        Log into cPanel

II.        Click “Site Management” select IP Deny Manager

III.        Click “Add an IP Deny” Enter IP address that you would wish to block

IV.        Click “Add” and that IP address will not be able to access website again.

Installing frameworks on cPanel

  1. Log in to cPanel.
  2.  In the Software/Services section of the cPanel home screen, click Softaculous. The Softaculous installer page appears.
  3. In the Search text box, type the frameworks’ name and then press ENTER.
  4. Click Install. The installation page appears.
  5. In the Choose Protocol list box, select the protocol.
  6. In the Choose Domain list box, select the domain for installation, or accept the default value.
  7. In the In Directory text box, type the directory where you want to install the application, or accept the default value.
  8. Click the  icon to expand Advanced Options.
  9. If you do not want to receive e-mail notifications when application updates are available, select the Disable Update Notifications check box.
  10. To receive site configuration information after the installation is complete, type an e-mail address in the Email installation details to text box.
  11. Review the installation options and settings, and then click Install. When installation is complete, Softaculous provides information about the application’s configuration.

How to upload a themes/plugins using FileZilla (ftp)

Sometimes it’s hard to upload a theme using the manual way.

This is because sometimes, themes might exceed the maximum upload size.

ftp process is one of the most convenient and sure ways to upload your file  from your computer to online sites.

Requirements:

  1. Download the desired theme in zip form
  2. Unzip the theme into a folder.
  3. Download the FileZilla client from https://filezilla-project.org
  4. Install the program in your computer and run it.
  5. Configure it to connect to your website.

This are the configurations

Hostname: put the hostname that was sent to you in the new account information.

Username: put the cpanel username

Password: put the cpanel password.

Port: 21

Press quickconnect.

  1. You should see the two windows side by side ie your local computer and your online site.
  2. Locate the unzipped theme in your computer.
  3. On the online site, locate the public_html folder
  4. Inside the folder locate the: public_html/wp-content/theme.
  5. Drag and drop your unzipped theme here.
  6. For the plugin the process is the same the only change is the last folder, the path is

public_html/wp-content/plugins

  1. Once you done that, monitor the progress and you’ll see the completion popup.
  2. Login to wp-admin and Appearance>themes/plugins, you should see your theme.

That’s all.

How to change the cpanel password.

Cpanel is define as a web hosting control panel that provides features e.g Domain, Security, Mail e.t.c that allow control of websites, webhost manager which has ability to manage every hosting account in the server.

In case you forgot password or the one provided in the welcome email does not work you can reset it by following the steps below:

1. Click Reset Password in the cPanel login page

2. Enter your cPanel username then click on Reset Password

Email showing the confirmation code will be sent automatically to the email address under your hosting account

3. Login to your email account to check for the Account Password Reset email and confirmation code

4. In case the link do not work, go back to cPanel page and enter the confirmation code. Click Submit

5. The window with the new password will appear. Now use to login to your cPanel account

How to back up website from cpanel

You can obtain back up for two reasons:

-To restore incase an update goes wrong

-To transfer to a new host

When obtaining back up for restoring purposes, kindly use partial back up: this means files will be a separate back up on home directory, database will be also separate and mails will be separate.

It is recommended to facilitate restore process of back up files.

Full back up is recommended for those transferring to a new host:

Partial back up

  • Login to cpanel using the details provided on New account information email
  • Go to file section
  • Click back up wizard
  • Click back up

Website files –partial back up

  • To back up files only click home directory back up,
  • click home directory button to download the back up files
  •  choose save file and click ok to complete download

Database-partial back up

  • To back up databases only click MYSQL database,
  • click  databases button to download back up databases(if your website was database driven)
  •  choose save file and click ok to complete download

Email-partial back up

  • To back up emails only click email forwarders and filters,
  •  select the forwarder email whose back up you want to download
  • choose save file and click ok to complete download

 

How can I reset the FTP account password?

Have you forgotten your ftp password of any of your accounts?

That cab be worrying but worry no more. You can reset your ftp account’s password.

  1. Login to cpanel.
  2. Navigate to cpanel FTP accounts (home>files>FTP accounts)
  3. Click change password of the account you want.

How to set up rules and redirects in .htaccess files in Cpanel

Htaccess file is a special text file with .htaccess extension that is created within  apache web server to configure and set up a custom directory level server environment without changing global setting of the server.

There are several rules that can be set using .htaccess.

  1. Directory Access Authorization and authentication Rule
  2. Blocking Access Rules
  3. Custom Error Pages Rule
  4. Mod_Rewrite / Redirection Rule

 

  1. 1.   Directory Access Authorization and authentication

Allow imposing of security restriction to access of directory and sub directories. When security restriction is in place, a visitor is required to provide username and password for access.

Setting up security restriction.

  1. Create the directory/ folder you want to protect in the following location.

/home/cpanel_user/.htpasswds/

e.g. for public_html/cloudpap  the path will be .htpasswds/public_html/cloudpap /

2. Add a passwd file in the directory –(/.htpasswds/public_html/cloudpap /) and add hashed access details using this tool – http://www.htaccesstools.com/htpasswd-generator/

3. Include the following lines to .htaccess: file

AuthType Basic
AuthName “Cloudpap”
AuthUserFile /home/cpanel_user/.htpasswds/public_html/passwd
require valid-user

 

2.  Blocking Access Rules

Allow a site administrator to prevent certain people from accessing certain sections of the website.

Blocking rules are mostly implemented using ip address.

To block 192.168.1.56 from accessing current directory using .htaccess – add the following lines to the .htaccess file

order allow,deny
allow from all
deny from
192.168.1.56

 

To block everyone else except 192.168.1.56 from accessing current directory add the following lines on the .htaccess file.

order deny,allow
deny from all
allow from
192.168.1.56

3. Custom Error Pages Rule

Custom error pages rule allow site administrator to redirect visitors to a custom page when an error occurs so that the can easily navigate to other area of the site.

Some of the errors include 404 error, 500, 403 error among others

Just ensure to create a file using the website theme with the respective error as the file name.

The add the following line to .htaccess file

ErrorDocument 404 /404.html – for 404 errors

ErrorDocument 403 /403.html– for 403 errors

ErrorDocument 500 /500.html– for 500 errors

 

4. Mod_Rewrite / Redirection Rule

Specifies how web page url will be displayed to the site visitors. It implements temporarily and permanent redirections.

Permanent (301) Redirect –

Most common redirect, inaddition to redirecting it directs search engines through user agents or browser that the previous url has permanently moved and  therefore they should update their databses as well.

301 redirect from truehost.cloud to cloudpap.com

 RewriteEngine On
RewriteCond %{HTTP_HOST} ^truehost\.cloud$ [OR]
RewriteCond %{HTTP_HOST} ^www\.truehost\.cloud$
RewriteRule ^/?$ “http\:\/\/cloudpap\.com\/” [R=301,L]

 

Redirect from truehost.cloud/subfolder to cloudpap.com

 RewriteEngine On
RewriteCond %{HTTP_HOST} ^truehost\.cloud$ [OR]
RewriteCond %{HTTP_HOST} ^www\.truehost\.cloud$
RewriteRule ^subfolder$ “http\:\/\/cloudpap\.com\/” [R=301,L] 

 

Temporary Redirect (302)

Most recommended type of redirect not in the cases that the former url has changed permanently.

302 redirect redirect the visitor or search engine to a new url but requires the browser or user agent not to cache or change from the old url.

302 redirect from truehost.cloud to cloudpap.com
Temporary redirect from example.com to domain.com

RewriteEngine On
RewriteCond %{HTTP_HOST} ^truehost\.cloud$ [OR]
RewriteCond %{HTTP_HOST} ^www\.truehost\.cloud$
RewriteRule ^/?$ “http\:\/\/cloudpap\.com\/” [R=302,L]

 

Redirect from truehost.cloud/subfolder to cloudpap.com

 RewriteEngine On
RewriteCond %{HTTP_HOST} ^truehost\.cloud$ [OR]
RewriteCond %{HTTP_HOST} ^www\.truehost\.cloud$
RewriteRule ^subfolder$ “http\:\/\/cloudpap\.com\/” [R=301,L] 

 

 

Other redirects performed on .htaccess

 

Redirect from HTTP to HTTPS

for a domain e.g. , truehost.cloud

 RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule .* https://truehost.cloud/%{REQUEST_URI} [R,L]

or

 RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^truehost\.cloud$ [OR]
RewriteCond %{HTTP_HOST} ^www\.truehost\.cloud$
RewriteRule ^(.*)$ https://www.truehost.co.ke/$1 [R,L] 

Redirect from non-WWW to WWW

for any domain within the server  .htaccess takes effect on:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] 

for a certain domain, e.g.  truehost.cloud:
 RewriteEngine On
RewriteCond %{HTTP_HOST} ^truehost\.cloud$ [NC]
RewriteRule ^(.*)$ http://www.truehost.cloud/$1 [R=301,L] 

Redirect from WWW to non-WWW

for any domain within the server .htaccess takes effect on:
 RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

for a certain domain, e.g. truehost.cloud:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.truehost\.cloud [NC]
RewriteRule (.*) http://truehost.cloud/$1 [R=301,L]

Changes the directory root for the main domain (truehost.cloud) to public_html/subfolder

 RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?truehost.cloud$
RewriteCond %{REQUEST_URI} !^/subfolder/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /subfolder/$1
RewriteCond %{HTTP_HOST} ^(www.)?truehost.cloud$
RewriteRule ^(/)?$ subfolder/index.php [L] 

What is Email forwarding?

Email forwarding refers to the operation of re-sending an email message delivered to one email address on to a possibly different email address. The term forwarding has no specific technical meaning. Users and administrators of email systems use the same term when speaking of both server-based and client-based forwarding.

Email forwarding can also redirect mail going to one address and send it to one or several other addresses. Vice versa, email items going to several different addresses can converge via forwarding to end up in a single address in-box.

How do I set up email forwarding?

1) Login to your Account Manager
2) In the “Account Manger” side menu, click “Open Control Panel”
3) Under “Mail” click on the “Forwarders” icon
4) Click on the “Add Forwarders” button
5) In the “Address: field, enter the name of the address you would like forwarded
6) In the “Destination” field enter in the destination email address, you would like it forwarded to
7) Click on the “Add Forwarder” button

Unable to send Mails on Your WebMail

I know this is very frustrating but lets pause a moment and see the possible reasons this could be happening.

  1. 1.   Mail Server (SMTP) is Offline

This is a common issue to WHM/cPanel and Plesk servers.  Simply restarting the service from the control panel often fixes the issue.

How To Restart Services In WHM cPanel      

As an administrator with cpanel credentials you can restart services in the cpanel.

Steps

  1. Login into cPanel with your root/administrator account.
  2. Search for “Restart” using the search tool on the side panel
  3.  The Services that can be restarted through cPanel are listed down.
  4. Click on the service that you want to restart. For this example, we shall restart the SMTP service. A popup message prompting for an action will appear, when you click on the service. Click “Yes” to proceed.
  5. Service will be restarted.
  6. A success message will appear if the service is restarted successfully.

2.   Blocking of Port 25 by the ISP

Many ISPs force you to use their own SMTP servers even if you have your own.

You can test if the port is blocked by running the following command on CMD

telnet [domainname or ip] [port]

3.   SMTP Authentication

Some email systems use an older authentication method called POP before SMTP.  With this method, you only need to configure your IMAP or POP3 settings correctly. This likely means SMTP authentication is not enabled.

How to configure webmail with incredimail

  1. Download and install incredimail on your computer
  2. Launch the application and fill in the following first

Gender and country

Nb: tick or untick the checkbox if you want or not the updates and click next.

  1. Choose others in the list since we are configuring webmail.
  2. Click next
  3. Here choose POP3 in my incoming mail server type.
  4. Incoming mail server: mail.yourdomainname
  5. Outgoing mail server: mail.yourdomainname
  6. Click next and wait as incremail connect to your mail
  7. Finish the configuration and there you go.
  8. Enjoy.
WhatsApp Truehost Kenya