Instructions on how to set-up a website for free; from hosting the site, to validating the html, registering with google analytics, setting up the domain name and setting up email at your domain name
Hosting the website for free
Sign up to Amazon's AWS service called S3, this allows you to host static content, and render this as a html website.
This service is free for the first year
- First create a bucket, give it the name that you will be pointing to the bucket, this is the name of the domain you will be using. For example if your domain name is www.kevsapps.co.uk you should call your bucket www.kevsapps.co.uk Don't make the mistake of misnaming your bucket, if your url/domain name does not match the bucket name then pointing your domain name at Amazon S3 will not work.
- Right click on your bucket, and click properties, click on the website tab in the bottom right properties pane
- Click "enabled"
- Give the name of the index file e.g. "index.html" and this will be the default file which is rendered by the webserver when it goes into a directory, e.g. the root directory that you point your url at will load the index.html of the root of your bucket. And subfolders will default to the index.html in the sub-folders, this means you can give an address e.g. http://www.kevsapps.co.uk/de-prepositions/ and it will load the index.html in that sub-folder which allows you to give out convenient urls.
- Give the name of the error page e.g. 4xx.html (you will upload this later), this will be the page that is rendered when there are any errors on the webserver e.g. a 404 error that indicates the page cannot be found.
- Take a copy of your bucket endpoint url as this is what you will need later for pointing your domain name to (via a cname dns record)
- Save your changes
- Go to the permissions tab
- Click Edit bucket policy
- Paste in the following;
{
"Version": "2008-10-17",
"Id": "8d4cb5dc-8d32-4e13-ac7b-db6aeb371621",
"Statement": [
{
"Sid": "PublicReadForGetBucketObjects",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::www.kevsapps.co.uk/*"
}
]
}
Changing where it says "www.kevsapps.co.uk" to the name of your bucket. Save this. - Upload your website, including the index.html files the 4xx.html error page, creating the subfolders, and uploading the index.html in these sub-folders. On uploading make sure to set the permissions so all the files are publicly available / viewable (set permission > make everything public).
Validating the html (and RSS) for free
Use the W3C html validator to validate your html for free. For each page on your website, paste in the url in the address field and click "check". Note that any issues will have detailed resolution information against them, which you can use to fix your html.
Use the W3C RSS feed validator to validate your RSS feed for free. Paste your feed url into the address field and click "check", the RSS feed will then be validated, and you should click on the help/more infor for details of how to fix each problem, the site provides detailed information on how to resolve each issue.
Registering with Google Analytics for free
To register your site with Google Analytics follow the following instructions:
- Log on to google analytics, if you don't have an account, create an account.
- Add a website profile
- Provide the url of the site to track, these needs to include the final slash e.g. "http://www.kevsapps.co.uk/"
- Save this, you should follow the instructions to register the tracking code on your website. This will involve adding some javascript to your html pages, before the final head tag.
- Now update the the profile and make sure the Default page is set to "index.html" or whatever you set as your default page. Its important to have the final slash in the url and the default page specified correctly or the tracking will not work correctly.
- For me it took 4 hours from installing the tracking code, until Google Analytics said it was collecting data (it initially stays as tracking not verified and was worrying for that time whether I'd added the tracking scripts correctly, however after about 4 hours tracking began).
Setting up a domain name
- First purchase a domain name e.g. you can purchase a domain name at www.123-reg.co.uk, however there are many other sites that provide this service
- Once you've got the domain name and access to an admin console to update the dns entry, add a cname record
- For the name "www" set the type to "cname" and set the content to the bucket endpoint name that you got from when you created your site on Amazon S3. You need to use a cname record with the amazon S3 service, because the service gives you a dynamic IP, so you have to use the url.
- Update / submit the dns record
- You should then see the url now point to your website e.g. www.kevsapps.co.uk
- You should take the opportunity to do a pemanent forward of the non-www domain name to the www.domain name e.g. kevsapps.co.uk gets directed to www.kevsapps.co.uk
Setting up email at your domain name for free
There are a number of services that provide email addresses at your domain name. One of these that is free is Windows Live Mail.
Go to Windows Live Mail and sign up for an account.
You will create a windows live id as administrator. You will then connect the email to your domain name by adding an mx dns record for your domain name. This will then allow you to create lots of email accounts @ your domain name. Note that when you create them uncheck the "ask for new password on first login", otherwise you will have to login in and reset the password for each account.
Note I had issues with Safari and Firefox logging in and logging out of the site and email accounts when it initially asks for you to set a security question. I resolved this by setting up the users in Internet Explorer on a Windows 7 PC, not ideal, but one solution.
You will want to redirect you email to your primary email account. To do this;
- Log into mail.live.com
- Go to options and then more options in the top right
- Click on email forwarding
- Select forward your email to the following email accounts. Add your email address where you would like it to be forwarded.
- Check to keep a copy of this email in your inbox for this account.
- Click done. You may wish to send this account a test email to check it is being correctly forwarded to your desired inbox.
