Author Archives: admin

Why Copying Another Website’s Code May Be Harmful

Why Copying Another Website’s Code May Be Harmful

We all have a favorite website and a favorite website design. We are impressed by some websites and also detest many. We try and incorporate what we have seen and felt about other websites, into our own web design, sometimes copying large chunks of the other websites. While this may achieve a short term goal of having a website which is pleasing, it may not be a very good idea in the long term. This article explains why copying the code of another website may be harmful for your website in the long run.

Security Flaws

When you mindlessly copy code from another website, you also copy over the flaws and vulnerabilities associated with it. This means that you may be exposing your website to several threats and exploits, which you may be blissfully unaware of. 90% of website developers use template based code or reused code snippets for page elements like menus, slideshows, banners and even animation. There is never any improvements or modification made to the code and they just adapt it to suit the needs of the client. Little do they realise that if and when a security flaw is discovered in that code snippet, their client will also be affected. Once a website is made, very little care is given to updating the code or replacing old technology with new, thereby offering little hope for security. Once of our client’s website was defaced more than 3 times in one month, because the developers kept restoring the old site which contained an inherent vulnerability in its menu system. Despite repeated warnings and inconvenience, they were completely unaware about how to solve the issue and correct the menu.

Efficiency

Large companies very often have carefully planned websites, proportionate to the web hosting resources that they possess. This means that their systems are capable of handling heavy animation, large data processing and truckloads of visitor traffic. Simply copy pasting their code onto your website can drastically reduce the efficiency of your website, causing it to repel visitors rather than attract them. A lesson can be learnt by an upcoming online retail shop, which tried to introduce features similar to Amazon, on their own website. Little did they realize that Amazon had monster servers with tons of RAM and Processing Power, which their Shared Hosting was no match for. Their site started ranking lower and served up pages slower, due to the great disparity in what they wanted the website to do and the resources given to the website.

Copyright Infringement

Copying source code of a website is a Copyright violation. Large companies sue their competitors for copying their source code, thereby claiming damages worth millions of dollars. Although in developing countries like India, China and Brazil copying of source code is rampant, enforcement is weak. Even then, in all these countries, copyright infringement is a criminal offence and the punishment can be very severe. In India, the police can search and seize computers and devices used to copy the website code, without a warrant from a magistrate. This has greatly helped reduce copyright violations as far as software source code and websites is concerned.

SEO

Although there is no concrete indication to show that if your website has copied source code then search engines will penalize you, there is a large probability that your website will not do as well as the site from which you have copied. If you copy text from a website and use it on your own site, search engines are sure to give you a lower ranking. However, as mentioned earlier, many large websites which are our role models, have given great thought before designing their website in a particular way. Their website has been specifically designed for their website, their business, their brand, their target perception and their environment. It is exactly like a tailored outfit, which has been crafted as per the specific measurements of the customer. It just wont fit as well on anyone else.

How Many Servers Does A Web Hosting Service Need?

How Many Servers Does A Web Hosting Server Need?

How Many Servers Does A Web Hosting Server Need?

Web Hosting customers don’t always realize what goes on behind the scenes of their web hosting service. The layman often thinks that the web hosting service is just another software installed on a monster computer, bit of which are sold to the end user. But there’s a lot more that goes on behind setting up a web hosting service. While some hosts use separate machines to run services like email, FTP, HTTP etc., some hosts install all these services on a single machine. This article takes you into the web hosting world and shows you which software servers are running to give you the best web hosting experience with different services.

Web Server

The web server is one of the most important parts of your web hosting service. The web server is what actually delivers your web page to the user’s browser. It also handles different requests for information that your browser makes and also takes care of incorrect or erroneous requests. When you see 404 error pages or warning messages, these are all served up by the web server. Web hosts commonly use IIS, Apache, Nginx and Tomcat amongst many different web servers. Web servers use the HTTP protocol to communicate with the user’s browser. The administrator also has the capability of restricting folders, files and websites through the web server configuration.

Mail Server

The mail server is essential when providing email service. The mail server allows the sending and receiving of email on specific ports. The mail server helps filter the received mail to different users’ folders and thereby allows multiple domains to be hosted on a single physical machine. Mail servers are also capable of redirecting mail and applying conditional filters to weed out unwanted mail and fight spam. Most mail servers allow the use of third party plugins or software to aid them perform their functions. For example mail servers can intelligently use third party RBLs or black lists to identify if a mail sender is actually a source of spam which should be rejected before he can reach the mail server. Mail servers usually use IMAP, SMTP and POP3 protocols to serve their purpose.

FTP Server

Almost every web host offers FTP services to transfer files. But most users don’t realize that this requires an FTP server at the hosts end. An FTP server allows connections using the FTP protocol, for the transfer of files. This aids users in downloading or uploading files in simple, quick and efficient way. FTP servers control the bandwidth usage, user connections, authentication system and even file management for the user. FTP servers are inexpensive to maintain and are now considered as included in any web hosting package.

SQL Server

An SQL server is a database management server which allows users to create and store data in relational tables, using the Structured Query Language or SQL. On windows machines, Microsoft MS SQL is installed, whereas Unix based hosting systems usually come with open source alternatives like MySQL, Postgresql, MariaDB among others. Web hosts sell databases based on the package that the user takes. Each database requires CPU and memory resources to function properly. Databases form up the backbone of most websites which have a Content Management System or which store a large amount of data.

Others

Some web hosts offer their own DNS service, for which they need to run a DNS Server on their systems. The DNS server just maps the domain name to the servers IP address so that when a visitor is using a service on a website, he is served up the right information from the right source. Premium web hosts offer File Sharing services and have a Web DAV Server either separate or integrated into their Web Server (as above). This allows users to quickly sync files to and from their website onto their mobile devices. Almost all web hosts also provide an SSH service so that users can connect securely to different ports for different services on the account.

While web hosting may seem like an easy business, managing all these services can be quite a task, which web hosts need to do on a daily basis.

When Do We Need MySQL Databases With Our Web Hosting?

Whenever you buy web hosting, your hosting provider is sure to include an option called “Databases” in his price quotation or package details. But not many of us know what are databases and why we need them when setting up a website. This article aims to explain a couple of reasons why we use databases and when we need them for our website.

The database systems we usually get with our web hosting accounts are all relational database systems or RDBMS. If we take a Windows hosting server we usually get Microsoft SQL aka MSSQL and if we take a Unix based system we usually get MySQL. Both these systems put your website data into tabular layouts for fast and easy retrieval.

Databases are a collection of rows and columns, where each row or column is related to the others in some way. Due to this relation, information from this database can be retrieved quickly and efficiently as compared to if the data was stored in any other unstructured format. You can consider a database as a collection of multiple spreadsheets which are all related to each other in some way or the other.

Security

A major advantage of having your data stored in a database is the ability to protect the database from unauthorized access, or the ability to protect a database record from being tampered with. A simple example would be the storage of login credentials. In a simple way, login credentials can be stored in a simple text file and be read by your script which does the authentication. However, your file will always save the password stored in plan text, making it vulnerable to anyone who has access to it. Databases have the ability to encrypt the entries using a hashing algorithm to obscure them. Further, to read or write to the database, you need to specify login details, something which is not easily possible with an ordinary text file or spreadsheet.

Efficiency

Due to the manner in which data is stored in the database, retrieval and storage is most efficient. Unlike a spreadsheet, where anything and everything can be stored in any cell, SQL restricts the type of information stored in each row or column based on certain conditions. This validation is inherent in the properties of SQL and is an added advantage for a programmer or developer. Due to the various inbuilt mechanisms that are present in RDBMS systems, they are the most preferred method of storage and retrieval of data.

An article on the DatabaseJournal Blog explains this in a lucid way:

“…The problem with text files is during a read, if the text file is large, it can take quite a bite of time to open and scan the contents of the file looking for what we want. Also, if we wanted to see all the sales to a specific customer, the entire text file would have to be read, and every line occurrence of the customer name would need to be saved in some temporary place until we had them all. If we saved to a spreadsheet instead of a text file, we would have a Sort feature built in. So we may be able to find all the sales to a specific customer quicker, but again, if the file was large, opening the spreadsheet could take a great deal of time.”

Administrative Control

Database systems also have various control mechanisms which allow easy administration of the database and tables within it. The most important part is user management. Each user can be given specific rights to the database, thereby allowing limitation in access so as to secure the data from being tampered, modified or altered. Database Administrator’s can tweak many settings of the database thereby restricting the flow of data, the connection speeds, maximum number of connections to the server and even adjust what hardware resources should be allocated for performing a task.

Is FTP Better Than A Web Based File Manager For My Website?

Is FTP Better Than A Web Based File Manager For My Website?

FTP accounts are given with all web hosting accounts, so that users can upload, download, transfer and modify files in their hosting account. But contemporary web hosting control panels like cPanel, Plesk, HSphere etc. also offer a web based file manager which works through the browser. The web based file manager does not need any additional software to be downloaded, but an FTP client is need for accessing the files through FTP. Then why use FTP rather than the file manager? We list a couple of points in favour of using FTP over your browser based file manager. This article advocates for the use of FTP over your web based file manager in certain circumstances.

Multiple Files

When transferring multiple files to or from your website, FTP is definitely your best bet. FTP clients allow multiple connections to the server, thereby allowing you to start multiple file transfers simultaneously. This can drastically increase your file transfer speed and same a lot of your time. This is especially useful when dealing with a large website with lots of files spread across a large number of files and folders. Web based file transfer interfaces usually do not allow multiple file handling and only allow you to transfer files one by one. This can be a headache and make it difficult to transfer many files quickly. FTP clients put files into a mail queue and allow you to set priority for file downloads. You can set a “Very High” priority on small files and set a “Low Priority” on Large files which will take time.

Bandwidth Throttling

FTP clients like FileZilla allow you to restrict the amount of bandwidth that the file transfers should take. This prevents donkey work like file transfer to take up a major chunk of your internet speed and allow you to use the network simultaneously for other important purposes. This can also be important if your ISP throttles your connection and gives you a slower speed at different times of the day. An online file manager rarely has such an option, especially because it is supposed to be rudimentary.

Automation

FTP clients allow you to automate many tasks. Some software allow you to batch edit documents in your account on the fly. Other FTP services allow you to perform certain functions or execute commands based on file downloads or uploads. For example some FTP clients allow you to shut down or restart the system when a file queue completes downloading. This can be especially useful for unattended systems where you have left the files to download over a long period of time and don’t want to monitor the progress. You can also open up programs or pass on information to software on your machine about the file downloads.

Secure Connections

FTP systems allow you to use an encrypted connection to transfer files. Using multiple methods of encryption, FTP allows more security than conventional browser based file managers, due to the multiple failure points in them. SFTP, FTPeS, FTP over SSH etc. are some common options that you can use when using FTP. These options need to be enabled by your FTP server in order to use them. Browser based file managers can also be accessed over a secure https connection, but the main cause for concern is browsers which are needed to access the files. An added security measure is that FTP clients can provide you a log of the files that were transferred so that you know exactly what is going on.

File Modification

FTP clients allow you to quickly change file permissions, file ownership, file locations and even allow you to edit files directly in the FTP client. This saves you time in uploading the file again. Some FTP clients also allow you to open a new connection in the same window so that you can copy or move files to and from each account. This can be especially useful when you are migrating a website from one server to another.

When in a hurry, you can always use a web file manager to make small changes or upload / download a couple of files. However, for mass file management, FTP clients become indispensable.

Taking a backup of your website in cPanel Paper Lantern

We all should regularly take backups of our website, whether we like it or not. A backup is like a flashlight, you never know when you may need it. You may never need it or may need it once in 365 days. But if you do need it and don’t have it, you will regret it.

1. Login to your cPanel account (For more see this article)

2. Select the Backup option in cPanel

3. Under the Partial Backups option, you can choose which parts of your website to backup.

The Home Directory option will allow you to backup all files in your account, except for the MySQL databases and the cpanel account configuration. This option will download a .tar.gz file i.e. a compressed tarball which contains the entire folder structure and files inside your hosting account.

The Database Backup will allow you to download a backup file for each individual database. The file format for the database backup is dbname.sql.gz i.e. it is a compressed file, which contains a .sql file of the database.

You can also download domain wise email forwarders, in .gz format by clicking on the Email Forwarder option.

 

Do note: If your internet connection is interrupted or there is some download issue, your downloaded file may be incomplete or corrupt. Always verify downloaded backups before relying on them.