To redirect all www traffic to non-www URL - you need to add the following lines in .htaccess file: RewriteEngine On RewriteCond %{HTTP_HOST} ^www.example.com [NC] RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] Replace example.com with your own domain name.
Continue readingCategory: Hosting Solution
How to create Raid1 mirroring with 3rd & 4th Drives in OVH servers
OVH panel offers easy Raid configuration for the partitions in up to 2 drives. Recently I was working on a server that has 2 SSDs and 2 HDDs. The server is intended to serve as a Shared Hosting server. My idea was to install the OS on the SSDs and use the HDDs for hosting…
Continue readingHow to clean /tmp directory automatically in Linux/cPanel using tmpwatch
The “tmpwatch ” command in linux is to removes files which haven't been accessed for a period of time. The tmpwatch recursively removes files which haven't been accessed for a given time. Normally, it's used to clean up directories which are used for temporary holding space such as /tmp. If you are noticing "/tmp" getting…
Continue readingHow to recursively change Directory & File permission to 755 & 644 respectively
To change all the directories to 755 (drwxr-xr-x): find /directory_location -type d -exec chmod 755 {} \; To change all the files to 644 (-rw-r- -r- -): find /directory_location -type f -exec chmod 644 {} \;
Continue readingHow to force redirect http to https using .htaccess
If you have an SSL certificate installed and would like to force your website to load with https URL - you may add the following code in the .htaccess file (Linux based hosting): RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] You need to place the .htaccess file in the home directory of your website.
Continue reading10 best Web Hosting companies – Plans & Pricing 2019
# 1 HostGator is the largest shared hosting service provider in the whole world. There are good reasons for which millions of clients host there websites with HostGator. There service quality and support is superb and that is what set's them apart from others. Following are their Shared hosting packages: Besides Shared hosting - HostGator…
Continue readingWhitelist IP or IP range in/out using iptables
#Flush existing rules iptables -F # Set up default DROP rule for eth0 (Assuming eth0 is the Ethernet Port) iptables -P INPUT DROP # Allow existing connections to continue iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT # Accept everything from the 192.168.0.x network iptables -A INPUT -i eth0 -s 192.168.0.0/24 -j…
Continue readingWhy email accounts get hacked and How to prevent it
As a web hosting professional, I often come across with issues where clients' email get hacked. It is not something tough to guess what the consequences are: Sends out thousands of spam emails Steals financial or other important documents Pretends to be actual email sender and commits forgery Email domains and IPs get blacklisted and…
Continue readingHow to check your website rank for certain keywords?
Want to check what your website rank is for some certain keywords? Here is the link where you can check your website rank in SERP (Search Engine Result Pages):
Continue readingGMail Phishing scam – Becareful !!
If you are a tech savvy person - you probably know how phishing works. However, this time attackers tried to use optical illusion to trap people into a new phishing scam targeting the GMail users. Here's how it looks like: Scammers attach an image which looks like it is an attachment. When you click on…
Continue reading