Webhosting Redirecting: Difference between revisions

From AAISP Support Site
No edit summary
Line 5: Line 5:
#Create an index.http file to redirect visitors to your main page.
#Create an index.http file to redirect visitors to your main page.


==Explanation==
=Explanation=
Lets assume that your domain is ''testing.me.uk''.
Lets assume that your domain is ''testing.me.uk''.


Line 11: Line 11:
You will already have a CNAME DNS entry for 'www.testing.me.uk' set to 'www-server.co.uk'. However, by default we do not create a record for just 'testing.me.uk' so one will need to be created.
You will already have a CNAME DNS entry for 'www.testing.me.uk' set to 'www-server.co.uk'. However, by default we do not create a record for just 'testing.me.uk' so one will need to be created.


We then need to tell the webserver to redirect visitors to your website with the 'www'.
==DNS Entry:==

==Setting up the Redirect==

==Creating the DNS Entry:==
The DNS entry will need to be an 'A Record', set to 81.187.30.81, ie:
The DNS entry will need to be an 'A Record', set to 81.187.30.81, ie:


[[File:Webhosting-dns.png]]
[[File:Webhosting-dns.png]]


This can be done on the Control Pages.
==index.http file==

==Creating and Uploading the index.http file==
An index.http file is a special file that our webserver will interpret specially. The file should be like this:
An index.http file is a special file that our webserver will interpret specially. The file should be like this:



Revision as of 15:48, 23 July 2013

If you would like your web site visitors to view your website without the 'www' part, then this is how to do it:

Overview

  1. Create a DNS 'A' Record
  2. Create an index.http file to redirect visitors to your main page.

Explanation

Lets assume that your domain is testing.me.uk.

Reason behind this: You will already have a CNAME DNS entry for 'www.testing.me.uk' set to 'www-server.co.uk'. However, by default we do not create a record for just 'testing.me.uk' so one will need to be created.

We then need to tell the webserver to redirect visitors to your website with the 'www'.

Setting up the Redirect

Creating the DNS Entry:

The DNS entry will need to be an 'A Record', set to 81.187.30.81, ie:

Webhosting-dns.png

This can be done on the Control Pages.

Creating and Uploading the index.http file

An index.http file is a special file that our webserver will interpret specially. The file should be like this:

HTTP/1.0 301 Page moved 
Location: http://www.testing.me.uk/ 
Content-Length: 0

With a blank line at the end (the blank line is important).

FTP to your web site, using the username of testing.me.uk (ie, without the www). There should be no files there, as your main website will be held under the 'www' directory which you'll see.

Upload the index.http file, and then go to your web address without the www, and you should get redirected.

Do contact support if you need help, as they can do this for you.