Category Archives: Uncategorized

Why my website is loading slow?

In this article we will cover some of the reasons why your website loading is slow.

Unoptimized Images
A large volume of unoptimized images is usually the most common reason behind website slowness. High-resolution images can consume lots of bandwidth while loading. Uploading larger sized images and then scaling them down can unnecessarily increase the size of your web page – causing your website to load slowly.

The image format is another important factor to consider. For example, JPEG images are much smaller in size compared to other image formats like PNG or GIF. Quite naturally, your web page will load faster if you are using JPEG images instead of PNG/GIF.

Solutions:

– Check the file size of your images, anything above 1MB is really unacceptable.
– Use JPEG instead of PNG, especially for larger images. Icons are ok.
– Use waterfall tests to easily scan image sizes and take corrective action.

JavaScript Issues
The availability of JavaScript/jQuery plugins has made it really convenient to add dynamic content to websites. However, if implemented incorrectly, JavaScript can cripple your website’s page load speed.

Solutions:

– Audit your JavaScript scripts to see what you really need and remove the rest.
– Consider using something like Google Tag Manager – a single script for all your tools.

Excessive HTTP Requests
Having loads of JavaScript, CSS, and image files can lead to too many HTTP requests. When a user visits your web page, the browser performs several requests to load each of these files – which can significantly reduce the page load speed.

Solutions:

– Reduce the number of files on your pages where possible. Includes CSS, images, javascript.
– Minify your CSS and Javascript files reduces the number of total files users will have to download.

Not Making Use of Caching
Whenever you visit a website, certain elements are stored in a cache, so the next time you visit the site it can easily access those parts and load much faster. With caching, instead of your browser having to download every single resource, it only has to download a few of them.

By turning on caching you can considerably improve your site’s loading for return visitors. If you’re using a CMS like WordPress you can install a plugin like W3 Total Cache, either of which will let you enable sitewide caching, or caching of certain site elements.

Another great tool for speeding up dynamic database-driven websites is Memcached. Memcached reduces that load by storing data objects in dynamic memory.
For more details see the following articles as well:

– How to use Memcached? 
– How to Enable Memcached on WordPress? 
– How to Enable Memcached on Joomla ? 


Too Many Ads
No doubt display advertisements are great for monetizing your websites traffic.

But that shouldn’t come at the cost of compromised performance or user experience. Don’t let too many ads be another reason why your website is slow!

The most obvious impact of overloading your website with advertisements is the addition of HTTP requests, which would need additional processing time.

Especially the rich media ads – like pop unders, interstitials and auto downloads – may create hundreds of HTTP requests making your website unresponsive.

How To Enable SSL (HTTPs) for your website?

Website visitors are becoming more aware of the importance of secure data transfer, and they often look for the green lock that appears in their browser on HTTPs-enabled websites.

Before you can have your website loading at https:// instead of http:// you need to have SSL certificate installed for your domain.

You can get one from the hosting control panel -> My Domains -> SSL Certificates

The options are either to Order SSL certificate or Request Let’s Encrypt certificate.

Once you have installed the SSL, please allow up to 1 hour for the new SSL IP propagation!

After you have enabled SSL certificate on your domain name, you will need to set up a redirect for your website to use SSL and HTTPs protocol.

The procedure is valid for any static or dynamic website, which does not have a configuration for the URL it is installed on, like WordPress.

If you need to enable HTTPs for your WordPress site, please see the How To Enable SSL (HTTPs) in WordPress article.

First, go to Files -> File Manager in your hosting control panel and navigate to your domain root folder, usually /www/mydomain.com/

If there is no file called .htaccess created, then create one using the New File button.

Edit the .htaccess file and place the following code at the top:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Click Save.

Once you do this, your website is now fully setup to use SSL / HTTPS.

How To Enable SSL (HTTPs) in WordPress?

After you have enabled SSL certificate on your domain name, you will need to set up WordPress to use SSL and HTTPs protocols on your website.

We will show you two methods to do that, and you can choose one that best fits your need.

Method 1: Setup SSL/HTTPS in WordPress Using a Plugin

This method is easier and is recommended for beginners.

  1. Log into the WordPress Dashboard.
  2. Roll your mouse over Settings in the navigation menu, then click General.
  3. In the WordPress Address (URL) field, enter your https address.
  4. Enter your https address in the Site Address (URL)  field. 
  5. Click the Save Changes button on the bottom of the screen. 

Once the settings are saved, WordPress will log you out, and you will be asked to re-login.

Then, you need to install and activate the Really Simple SSL plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit Settings in the navigation menu, then click SSL. The plugin will automatically detect your SSL certificate, and it will set up your WordPress site to use HTTPs

The plugin will take care of everything including the mixed content errors. Here’s what the plugin does behind the scenes:

– Check SSL certificate
– Set WordPress to use https in URLs
– Set up redirects from HTTP to HTTPs
– Look for URLs in your content still loading from insecure HTTP sources and attempt to fix them.

Note: The plugin attempts to fix mixed content errors by using output buffering technique. It can have a negative performance impact because it’s replacing content on the site as the page is being loaded. This impact is only seen on first-page load, and it should be minimal if you are using a caching plugin.

Method 2: Setup SSL/HTTPS in WordPress Manually

This method requires you to troubleshoot issues manually and edit WordPress files. However this is a permanent and more performance optimized solution.

  1. Log into the WordPress Dashboard.
  2. Roll your mouse over Settings in the navigation menu, then click General.
  3. In the WordPress Address (URL) field, enter your https address.
  4. Enter your https address in the Site Address (URL)  field. 
  5. Click the Save Changes button on the bottom of the screen. 

Once the settings are saved, WordPress will log you out, and you will be asked to re-login.

Next, you need to set up WordPress redirects from HTTP to HTTPS by adding the following code to your .htaccess file.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

If you want to force SSL and HTTPS on your WordPress admin area or login pages, then you need to configure SSL in the wp-config.php file.

Simply add the following code above the “That’s all, stop editing!” line in your wp-config.php file:

define(‘FORCE_SSL_ADMIN’, true);

This line allows WordPress to force SSL / HTTPs in WordPress admin area

Once you do this, your website is now fully setup to use SSL / HTTPS, but you will still encounter mixed content errors.

These errors are caused by sources (images, scripts, or stylesheets) that are still loading using the insecure HTTP protocol in the URLs. If that is the case, then you will not be able to see a secure padlock icon in your website’s address bar.

Majority of the incorrect URLs will be images, files, embeds, and other data stored in your WordPress database.

All what you need to do is find all mentions of your old website URL in the database that started with http and replace it with your new website URL that starts with https.

You can easily do this by installing and activating the Better Search Replace plugin.

How to use Memcached?

The Memcached system is used by some of the most traffic heavy sites such as YouTube, Facebook, Twitter.

It is also supported by some popular CMSs such as Drupal, Joomla, and WordPress.

To use Memcached with PHP, please enable memcached extension from the control panel at Advanced -> PHP Settings -> Edit php.ini -> memcached On.

To have Memcached enabled your plan needs to have Memcached instances available. In case you need to add one or more, you can purchase it as an upgrade from the Add/Upgrade service(s) section in the hosting control panel.

Each instance goes with 16 MB of memory which is why the Memcached instances go with Memcached memory.

Important: many applications require host and port to link them with Memcached. On our system the Memcached works on a Socket instead of Port.

In this case you need to use

Memcached hostname(IP): unix:///home/sys/memcached.sock
Memcached Port: 0

Example: $memcached->addServer(‘unix:///home/sys/memcached.sock’, 0);

How to Enable Memcached on WordPress

In this guide, we’re going to use the free extension W3 Total Cache to configure WordPress with Memcached.

If you’re already using another extension such as WP Super Cache, you’ll need to deactivate this and install the W3 Cache in order to follow this guide.

Here are the steps to follow to configure W3 Total Cache with Memcached:

1. Sign in to your WordPress dashboard
2. In the main menu, go to Performance then click on General Settings
3.  Activate Memcached for the following options:

– Page Cache Method
– Minify Cache method
– Database cache method

-> Save the settings

For Memcached hostname:port / IP:port use: /home/sys/memcached.sock:0

Save the settings and you’ve successfully enabled memcached on your WordPress website.

How to Enable Memcached on Joomla

You can speed up your Joomla site by using memcached.

To enable memcached on Joomla, you need to modify a few settings in your Joomla configuration.php file first.

You can find this file in your Joomla site’s root folder. Using your favorite FTP software, edit this file and find the following lines:

public $caching = ‘0’;
public $cache_handler = ‘file’;

Change these lines to the following:

public $caching = ‘2’;
public $cache_handler = ‘memcache’;

Then, immediately after the two lines you edited, add these two lines:

public $memcache_server_host = ‘/home/sys/memcached.sock’;
public $memcache_server_port = ‘0’;

After you are done making all the changes, save the configuration file.

Configure Memcached in Joomla Settings

Now, we will configure memcached on our Joomla-based website.

Login to your Joomla site’s admin panel and navigate to System -> Global Configuration.

Click on the server tab at the top and scroll down to Cache Settings. From the drop-down menu select Persistent(Memcached).

Note: Make sure to enter the correct Memcached server host and port for your server.

Memcache(d) Server Host: /home/sys/memcached.sock
Memcache(d) Server Port: 0

Save the settings.

You’ve successfully enabled memcached on your Joomla website.

How to add SSL for my domain/subdomain – a step-by-step guide

SSL is used to secure the connection between your website and the customer’s computer. It is recommended when you have an online form which gathers personal or sensitive information from your website users, such as billing and registration details, for example.

Although it is not a definitive requirement to have SSL in such cases, it is a way to protect the data of your users and it is valued and even demanded by many customers.

To activate SSL for your domain (or subdomain) you need to install an SSL certificate for it. To be able to install SSL for any domain it must have a dedicated IP address. Learn how to get a dedicated IP in this article: How do I get a dedicated IP for my domain/subdomain?

Assuming that you already have a dedicated IP for your domain, here is what you must do to activate SSL:

Step 1: Purchase an SSL certificate
You can purchase an SSL certificate by going to My Domains > SSL Certificates > Order SSL Certificate button on your web hosting control panel. Input the following details in the order form:

CSR Details

Hostname: Select a domain name from the drop-down list for which you want to order a certificate.
Organization: Type in the exact legal name of your organization. Do not abbreviate the name of your organization. 
Organization Unit: Specify the exact department of your organization (optional).
Country: Select your country from the list.
City: Type in your city.
State: The state or province where your organization is legally located. It should not be abbreviated.
E-mail: Type in your personal e-mail address.

Note that none of the following characters can be used in the details: < > ~ ! @ # $ % ^ * / ( ) ?.,& 
 
Contact Info

All fields are pre-filled with the details you provided for your hosting account.

*If you choose to use a different hostname, you must select an “Approver E-mail” at the bottom, which must be an e-mail account hosted here (one created in the E-Mail Manager on your web hosting control panel).

Purchase Details

Choose a shared IP address or a dedicated IP for which the SSL certificate will be issue.

Select the registration period – 12 months.

Make sure you read the User Agreement and select the checkbox next to “Accept User Agreement“, then select a payment method and finally click on the “Continue” button at the right. You will be forwarded to a billing gateway page to submit the payment.

Once your payment has been submitted, you will be able to see your newly ordered certificate in My Domains > SSL Certificates menu in your web hosting control panel. As soon as the status is changed to “Active” you can apply the certificate to your domain.


Step 2: Install an SSL certificate

a) Install an SSL certificate purchased from us

Go to My Domains > SSL Certificates and find your domain (or subdomain) in the list (Domain column) and click on the View SSL Certificate link (Action column) on the right. On the new “SSL Certificate Configuration” popup window, select the domain for which you want to install the certificate.

After that you must select IP from the drop-down list.

When ready, press “Activate SSL certificate” button.
—————————————————————————————
b) Request Let’s Encrypt certificate

Go to My Domains > SSL Certificates and find your domain (or subdomain) in the list (Domain column) and click on the Add  SSL Certificate link (Action column) on the right. On the new “SSL Certificate Configuration” popup window, select the “Request Let’s Encrypt certificate” option.

After that you must select IP from the drop-down list.

When ready, press “Activate SSL certificate” button.

—————————————————————————————
c) Install an SSL certificate if you already have one

Go to My Domains > SSL Certificates and find your domain (or subdomain) in the list (Domain column) and click on the Add SSL Certificate link (Action column) on the right. On the new “SSL Certificate Configuration” popup window, select the option to “Upload SSL certificate” – as soon as you select this option, 3 text fields appear under the form:

Private key
SSL certificate
CA

After you fill in all fields, you must select IP from the drop-down list.

When ready, press “Activate SSL certificate” button.

If you have followed this tutorial strictly, now you should have SSL activated for your domain.

Can I use a domain name I registered with another company (registrar)?

When you register a domain name you reserve the name for a period of time (usually a year or two).

It is not necessary to have your domain name registered with the same company that would be hosting your website (and thus your domain).

However, you have to point the domain to your hosting space to make it work properly. This is done by applying your hosting company’s name servers to your domain name.

Inside the domain control panel provided by your registrar (the company you registered the domain with) you should have the option to change the name servers, which may also be referred to as NS or DNS change.

To properly host a domain registered with another company with us, you must:

  1. Add the domain to your Hosted Domains list (My Domains > Hosted Domains)
  2. Set our name servers for your domain
  3. Wait for the name server change to propagate (usually within 12-24 hours)

Additional information and instructions could be found in the following articles:
– How do I host a domain name?
– What are the correct name servers (DNS) for my domain?

How do I setup custom error pages for my website?

Whenever an error occurs on the server, it displays an error page to the visitor with information and tips about the possible cause for the error. These error pages do not match your website’s layout and are sometimes too general.

You may want to set up your custom error pages, which should be displayed to your visitors whenever an error occurs.
website’
There are two methods that could be used to achieve this.

1) Editing the domain/subdomain options in the Subdomain Manager section.

We have embedded the option to set a custom error page for server errors 400, 401, 403 and 404 inside the Subdomain Manager section of your Web Hosting Control Panel (My Domains > Hosted Domains).

Find your domain in the list and click on the “Edit Domain” icon () from Actions column on the right. You are now able to edit the error page options.

You should see the following options:

Error 400 page:
Error 401 page:
Error 403 page:
Error 404 page:

Initially, all error pages are set to “Default“. To set a custom error page, choose “Custom URL” and enter the path to the corresponding error page in the field.

If you haven’t created one yet, do this first and then get back to the Subdomain Manager section to update the settings.

2) Using .htaccess

Just like with the first method, which is described above, you must create the corresponding error page(s) first. When ready, open the File Manager section of your Hosting Control Panel (Files > File Manager) and navigate to your domain/subdomain folder – it usually has the same name as your domain/subdomain and is located inside the www/ directory.

Inside the domain folder create an empty file called .htaccess using the form located at the top of the File Manager section. Then edit the .htaccess file with the plain-text editor and insert the following code:

ErrorDocument 400 /custom400.html
ErrorDocument 401 /custom401.html
ErrorDocument 403 /custom403.html
ErrorDocument 404 /custom404.html

In the above example the custom 404 error page is located in the same folder as the .htaccess file and it is called custom400.html.

Edit the path and the name of each page accordingly to reflect the actual names and location of your custom error pages.

This method would work no matter what the settings in the Subdomain Manager section are.

How to redirect/forward a website (URL redirection)

There are different ways for you to redirect a domain to another one or, in general, one URL to another. Most of the available options are explained in this article:

1. Using our URL Redirection tool
In your Control Panel you will find the URL Redirection section (Advanced > URL  Redirection). For detailed information about the options visit the tool and click on the Help button.

2. Framed redirection
If you want to redirect visitors but keep the URL (address) in the address bar unchanged, you have to use framed redirection. Basically, what you do is create a file that loads the new website (which you want to redirect to) in a frame. To use framed redirection to redirect my-best-domain.com to my-best-domain.net, for example, you can create a file called index.html and put it inside the main folder of my-best-domain.com. The index.html file must have the following code:

<html>
<head>
<title>TITLE OF THE PAGE</title>
<frameset cols = "100%">
<frame src ="http://my-best-domain.net" />
</frameset>
</head>
<body>
</body>
</html>

Of course, make sure to replace “TITLE OF THE PAGE” with the actual title that you want your visitors to see and replace “http://my-best-domain.net” with the actual web address, which you want to redirect the visitors to.

(3) Using .htaccess and the Redirect directive

If you need to forward visitors to the new address and don”t mind that the URL in the address bar will change, you can use the following technique:

Create a file called .htaccess inside the main folder of your domain. You can do this using the File Manager (Files > File Manager) section of your Web Hosting Control Panel. Edit the .htaccess file to put the following code in it:

Redirect 301 / http://my-best-domain.net/

The above code will redirect visitors to http://my-best-domain.net/ and “tell” search engine spiders (bots) that your URL has changed permanently – this is what the 301 code means.

Using this technique you can also redirect specific URLs, for example a single page. If you used to have a page called page.html and you renamed it to newpage.html, you may want to create a redirection, which will forward visitors who try to open page.html to newpage.html. This is how it”s done with .htaccess: 

Redirect 301 /page.html http://my-best-domain.com/newpage.html

*Additional uses of .htaccess:

You have changed the file extension?

RedirectMatch 301 (.*).html$ http://my-best-domain.com$1.php

This example is perfect if you have decided to switch from .html pages to .php, keeping the old names of the pages and changing only the file extensions. Now, be careful with this because any .html page there is will be redirected to a page with the same name but with a .php extension, regardless of whether such .php file actually exists.

Redirect all www traffic to a NON www version of the site (http://www.my-best-domain.com -> http://my-best-domain.com):

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.my-best-domain.com [NC]
RewriteRule ^(.*)$ http://my-best-domain.com/$1 [L,R=301]

Redirect all NON www traffic to a www version of the site (http://my-best-domain.com -> http://www.my-best-domain.com):

RewriteEngine on
RewriteCond %{HTTP_HOST} ^my-best-domain.com [NC]
RewriteRule ^(.*)$ http://www.my-best-domain.com/$1 [L,R=301]

You have purchased SSL for your domain and now wish to redirect ALL traffic to an HTTPS version of your site?

RewriteEngine On
RewriteCond %{SERVER_PORT} !443
RewriteRule ^(.*)$ https://www.my-best-domain.com/$1 [R]

(4) Redirecting using the META tag refresh
In HTML files you can put a META tag refresh to refresh the page after a certain amount of time. The META tag refresh also allows you to refresh to a new URL, which virtually means forwarding the visitors to a new web address. To use this technique you must create an index.html file inside your domain”s main folder with the following code:

<META http-equiv="refresh" content="0;URL=http://my-best-domain.com">

 This will redirect the visitor immediately to my-best-domain.com.

(5) Using the Location Header in PHP
This technique works similarly to the afore-mentioned one where we redirected the visitor using the HTML META tag refresh. However, instead an index.html file, here you must create an index.php file inside your domain”s main folder and use the following code:

<?
header("HTTP/1.1 301 Moved Permanently");
header ("Location: http://www.my-best-domain.net");
?>

This will redirect the visitor to http://www.my-best-domain.net and will “tell” search engine bots that the address has changed permanently.

(6) Redirecting using JavaScript
Control over what page is loaded into the browser rests in the JavaScript window.location property. By setting window.location equal to a new URL, you will in turn change the current webpage to the one that is specified. If you want to redirect all your visitors to www.my-best-domain.net when they arrive at your site, you will just need the script below:

<script type="text/javascript">
<!--
window.location = "http://www.my-best-domain.net/"
//-->
</script>