One of the first things many webmasters are interested to do once they have built their website is to learn how to make money online. If you've put a lot of effort into building a quality website and you're receiving visitors from all over the world, there are always opportunities to make money with a website. [Read more…]
You can password protect specific directories on your website very easily in just a few minutes. You might want to password protect a directory to:
- Restrict access to certain directories so that only you can access them
- Allow certain users to view content specifically for them
- Prevent bots and search engine spiders from indexing the content
What is a parked domain name?
Put very simply, a parked domain (or parking a domain) is when you purchase a domain name such as
sitebeginner.com but you don't associate it with any web services like email or web hosting. Instead, you “park” it for later use – often with a landing page or holding page.
Usually, when you set up or start a website you would want to register your domain name for an annual fee. Then, you'd point the domain to a website so that the website appears when visitors go to the domain name.
In some cases though, you may just want to purchase the domain name initially and park it, ready for use later.
Why you might want to park your domain name
By definition, parking your domain means you don't intend to use it right away. Much like you might park your car ready for use later. There are plenty of good reasons why you may want to use domain parking for your new name:
- You haven't had time to start your website yet. To use your domain name, you need to be able to point it towards a web hosting account. If you're just started out you may not have had a chance to sign up to a host such as Bluehost or Web Hosting Hub yet so there's nowhere to point your domain.
- You're buying domains to reserve them for later use. Parking a domain or domains that you want to use later makes sense because once you do have hosting ready, you can quickly connect them and start to create your website using the domain names – it also prevents somebody from registering them in the mean time and protects your name.
- To generate additional income. You might not have a particular idea for a website, but are instead investing in a good quality domain name. Here, you can display advertising on your parked page to earn income whenever somebody visits your page and clicks on one of the advertisements. It's very quick and easy to do, and is passive income in that you don't need to do anything for it to continue.
- You no longer need your website and are waiting for it to expire. If you have many websites, you may want to park the ones you no longer intend to keep until they expire – again, you can earn additional income from these until they have expired.
Domain name parking services
There are services out there that will allow you to have free domain parking in exchange for a percentage of the earnings made through advertisements on your parked page. If you have no interest in making money off your parked domains and just want to park them for future use, you can use your registrars free option to park this at no cost.
The below registrars all offer a free parked domain option:
If you are looking to make money from your parked domains, I'd recommend using Sedo. It's free to park your domain with them (many others charge you a fee and a large percentage of your advertising revenue) and they have a very active and large marketplace.
Personally, I do not park domains because there is a danger that people may associate the ad-heavy parked pages with your domain name if you later decide to add a website to that domain. The cost of your brand and reputation may suffer because of this. This is why I do something a little different with domains to allows me to “park” them myself.
My alternative to domain name parking
This is a great way to manage your domain names if you're not ready to build your site just yet and don't want to park your domain name either.
What I do is take one of my unlimited web hosting accounts, which lets me add as many domain names to the account as I like, and I add each domain to this account when I purchase them. Then I create a very simple
index.html page with a little bit of content about the domain and, if I want to, some Google Adsense advertising.
This works so well because shared web hosting is very cheap and it only costs me $3.99 a month to run my unlimited Web Hosting Hub account.
Here's my step-by-step process for parking my own domains:
- I purchase my new domain with the registrar Namecheap (who I use for all my additional domains)
- I “point” this domain toward my Web Hosting Hub account
- I create a simple
index.htmlfile, similar to my Dreamweaver tutorial
- I place some Google Adsense ads on the page (optional)
For the grand total of $3.99 a month I can have as many parked domains as I like and I can completely control what content is show on those parked pages as well. I can control my brand and my reputation and I get to keep 100% of any revenue I make.
So, you can see that domain name parking is a very simple concept and it is also something you can do very easily yourself too.
Sometimes when running a website you might need to run scheduled tasks at certain times. Certain software may require you to set up these tasks so they can work correctly. For example, you may need to update or backup your database on a daily or weekly basis, or send a notification email.
For these types of scheduled task, you can set up a cron job to handle them.
What is a cron job?
There's a bit of jargon to cron jobs, so let's go through exactly what they are and how they work:
The software utility cron is a time-based job scheduler in Unix-like computer operating systems. People who set up and maintain software environments use cron to schedule jobs to run periodically at fixed times, dates, or intervals.
Put simply, a program on the web server (known as a cron daemon) runs in the background and is responsible for launching your cron jobs when they are scheduled to be run.
This schedule is stored in a configuration file named
crontab where all of your tasks and their times are listed. This step-by-step guide will help you to schedule your tasks using this crontab program.
What you need to schedule a job
There are a couple of things you'll need to be able to create a cronjob for your website:
- A unix/Linux based operating system. Cron and crontab are command line functions which only work with Unix-like operating systems such as Linux. If you're using a Windows server, you won't be able to do cron jobs. Instead, you'll need to use the Windows Task Scheduler.
- Secure shell access or control panel interface for Cron. You need to be able to access your site or server via the command line with shell (SSH) access or alternatively, your web host needs to have a Cron scheduling app in their control panel dashboard.
This tutorial assumes that you have shell access to create your cron jobs. Even if your hosting company offers a tool to set these tasks for you, it's useful to lean how to do it yourself. It's very easy once you get started.
If your web hosting provider doesn't offer SSH, my cheap web hosting guide might help you find one that does.
Setting up your cron job on the server
- Choosing your schedule for the task. Before you start you'll need to work out how often your cron job task should run. Some shared web hosts have set limits on this and might only allow you to run a task once every 15 minutes or more. If you have a VPS or your own server, usually you have no limits on how frequent your tasks can be.
- Learning how to write your script for crontab. The syntax for crontab is a little bit confusing at first, but not too difficult once you understand it. The basic format of a crontab schedule has 6 fields which are separated by spaces. Here's what each field means:
minute hour day month day-of-week command-line-to-execute
Each field has an accepted value range, and they must be in that order with no empty or missing fields. The accepted values for each are:
Field Accepted value minute 0-59 hour 0-23 day 1-31 month 1-12 day-of-week 0-6 command-to-execute the command to run, and any parameters it needs
The asterisk is often used in the cron job and crontab syntax as a wildcard. It means all possible numbers for that position. For example, setting the minute as * would mean the cron job is set to run every minute.
Cron job examples
This cron job will run every minute of every hour of every day (and might not work if you run shared hosting that restrict cron jobs):
* * * * * your-command
This cron job will run at minute 0 of every hour and is a common hourly task:
0 * * * * your-command
This job will also run hourly, but at 30 minutes past the hour instead:
30 * * * * your-command
This cron job will run once per day at 5.40pm (note the use of 24 hour time):
40 17 * * * your-command
This job will run every Friday, every hour (but not on any other day of the week):
0 * * * 5 your-command
You can use multiple numbers separated with a comma. This will run at 15, 30, and 45 minutes of every hour, every day:
15,30,45 * * * * your-command
You can also the division operator. This will run 10 times every hour (every 6 minutes):
*/6 * * * * your-command
Specify a number range using the dash symbol. This will run once per hour between 01:15am and 04:15pm:
15 1-4 * * * your-command
You can also run a cron job every time the server reboots:
Editing the crontab
Once you have your script and your cron job ready, you'll need to add it to the crontab so that it can be scheduled and run on the server. To view the crontab you can use the follow command when connected to your server using SSH:
This will open up the crontab file in the vi text editor used with Unix based operating systems. It can be difficult for beginners to understand and use though. If you decide to edit the crontab this way, you may need to learn some vi commands.
To see the crontab without actually editing it you can use:
If you want to remove the contents of your crontab, you can use this command:
Creating your crontab file
The easiest way for beginners to create a cron job and add it to crontab is to use the examples above, along with your script, and create a simple text file with all of your jobs – each on a separate line. You save this file using whatever name you like and then you'll need to upload it to your server using an FTP client such as FileZilla.
To use this text file as your crontab, you can use the following command (you may need to “cd” or change directory to find where you uploaded your text file):
Doing this will overwrite all existing cron jobs without warning, so make sure you've either backed them up or included them in your text file if you need them.
Email notifications for your cron jobs
By default, cron will send any output from the script to your email address if you've specified one. If you have multiple cron jobs running and you don't change the default output, you'll receive everything the script outputs – which can be overwhelming for your email inbox.
To add email notifications to your crontab schedule, you'll need to modify it by adding
MAILTO="" to a new line. For example:
MAILTO="email@example.com" 0 * * * * your/cron/job.php
This will send email notifications each time this script is run, complete with outputs. For this job, that means an email every hour for each time the script is run.
Receiving error notifications
If you don't want to receive the entire output of your tasks, but you do want to be notified of errors in the script then you can redirect normal output messages into a “black hole” by using the command
> /dev/null. Anything sent here is ignored by the system, but error messages will send as normal. For example:
MAILTO="firstname.lastname@example.org" 0 * * * * your/cron/job.php > /dev/null
Common cron job errors
You you received any error messages when running the command
crontab my-cron-jobs.txt then you may have made one of the following errors:
- You split your time schedule and script command onto more than one line. All cron job tasks should be a single line. Make sure you turn off the Word Wrap function of any text editor you use and avoid Microsoft Word or other word processors that add formatting.
- Your crontab file didn't end with a new line. At the end of your last crontab command line, you need to press enter or return to end your file with a new line.
- Your text file was not in ASCII format. If you used Word, or added formatting this may have caused the error. Resave your file as .txt using a simple editor like Notepad then reupload the .txt using your FTP client.
Cron jobs can seem overwhelming at first, but once you've run a few of them with various scripts you'll see that they are a valuable tool for system admins and performing many functions on web sites and web applications.
If you're looking for a free HTML editor that will help you to a make a website quicker and with less mistakes made, this article should help. I'll cover some of the best HTML editors that are freely available at no cost.
Benefits of an HTML editor
- Auto-completing tags. Sometimes, especially when learning HTML you might forget the name of a tag you need to use. For example, you might want to make something bold by using the
<strong>tag but can't remember it. Typing just the less than symbol (<) will give you a dropdown list of all the elements so you can easily scan and find what you're looking for.
- Error checking. Many free HTML editors have the ability to check your code for any errors that might have been made by mistake, allowing you to fix them. Finding them before making your site live on the web is a much quicker and efficient way to make a website.
- Connecting directly to your hosting. If you already have commercial hosting set up, you can connect your HTML editor to your host using an FTP connection so that whenever you save your file, it is instantly updated on the web. It's a very fast way to publish your website without constantly having to upload via FTP.
WYSIWYG editor or code editor?
There is also a debate over whether it is better for beginners to use a WYSIWYG editor instead of code. WYSIWYG stands for What You See Is What You Get and it allows you to build you web page in a similar way to how you might use Microsoft Word.
With WYSIWYG you can drag and drop, insert images and create numbered or bullet lists using an editor just like in Word. The editor would then take that and create the HTML code for you. There is a huge advantage to this in that beginners do not need to learn how to code an HTML page or remember any tags.
However, there is also an argument that the code these editors create is not as clean or readable by search enginer spiders as code written by hand using an HTML code editor.
From my experience, some WYSIWYG editors work better than others for creating clean code – see the list below for my recommended WYSIWYG editors.
Free HTML editors
Below is a list of some of the more popular free HTML editors available. These are all code-based editors which allow you to build your own pages using HTML code.
- Sublime Text. Sublime Text is a very sophisticated text editor for code and web markup. It has a very easy interface with different color schemes depending on your taste, along with great features like auto-complete elements, code highlighting, split screen mode and a distraction free option which removes all the menus from the editor so you can just write your HTML. It's free to use, but a license for $70 is recommended if you use it long-term.
- CoffeeCup. Another very popular free HTML editor which also comes in a pro version for $49. It has some advanced featured like SiteSpider and Code Cleaner which finds broken links, messy code, and non-compliance to standards. Also, it has built-in FTP to connect to your web server.
- NetBeans. This is a free and open source editor which makes coding your website very quick and easy. It has support for HTML5 and iOS and Android browsers as well so you can make high quality mobile websites as well.
- Notepad++. A very popular editor, which is completely free and open source, that has syntax highlighting as well as syntax folding (so you can hide sections of code to keep things tidy). It also has word and function auto-completion and does have a WYSIWYG interface as well.
- HTML-Kit. This is another HTML editor which has both a free and paid version and it allows you to preview your code as you edit – either inside the editor, or in PCs/Macs, tablets and smart phones. You can also ave time with shortcuts, plugins, code wizards and powerful find/replace options.
- Bluefish. This powerful editor is a lightweight, free, and open source editor with support for multiple languages such as HTML, PHP, Ruby, Python and many more.
Free WYSIWYG editors
If you're not comfortable with HTML code just yet, these WYSIWG editors will allow you to make a web page easily without needing to know any code.
- TinyMCE. This is a very popular web-based HTML WYSIWYG editor used by popular content management systems like WordPress. You can easily add images, links, lists and quotes to your webpage very easily without needing to know any HTML code whatsoever.
- KompoZer. Another great open source project which boasts features like an FTP site manager, a color picker, cleaner HTML code, and a powerful form creator.
- CKEditor. This is a 10 year old, tried and tested free HTML editor with some great features. You can now paste directly from Microsoft Word without breaking any formatting. It also has a very big focus on accessibility – generating websites that can be used by the visually impaired with screen readers and so on. It's also one of the only editors which has inline editing that removes the need for multiple views.
- Aloha Editor. This is a very advanced and powerful HTML5 editor which is also available for WordPress, Drupal and other CMS like Typo3. It also has a front-end editor which you can simply click to begin editing and there is a nifty table tool which lets you add tables just like you would in Microsoft Word.
- Amaya. A free and open source WYSIWYG editor from W3C (who develop the web standards). It is very simple, designed purely for HTML and CSS editing. If you don't need any bells or whistles, this is a good choice.
- SeaMonkey. An all-in-one internet application suite that has dynamic image and table resizing, quick insert and delete of table cells, improved CSS support, and support for positioned layers.
- Trellian WebPage. Provides an intuitive interface with color highlighted HTML and a drag and drop interface that allows you to absolutely position elements on the page. It also has an inbuilt spell checker and supports all major image formats as well.
Which is the best HTML editor?
This question doesn't have an easy answer and many people will have a difference of opinion depending on their preferences. For me, personally, I have used Adobe Dreamweaver for the past 7 years and have found it to be by far the best HTML editor out there.
It isn't free or cheap, but it is by far the best WYSIWYG editor out there, far surpassing any of the free and open source versions. The code view is equally as impressive and the auto-completing of tags alone is very valuable.
It can be used by both beginners and professional webmasters and is a great choice if you want to invest in the best editor possible. I have a series of Dreamweaver tutorials which will help you to find your feed if you decide on this option.
Alternatively, my second best editor is Sublime Text – which is free to use but it is strong recommended that you upgrade for an additional $70.
Finally, you can follow my How to Make a Website guide for more details on building your first site – you may not even need an HTML editor if you choose the easier route of installing a CMS like WordPress.