< Browse > Home / XHTML & Coding / Blog article: Server Move

| Mobile | RSS

Server Move

June 14th, 2005 | 6 Comments | Posted in XHTML & Coding

Well, I did it, I closed putertutor.net. I redirected the domain name, putertutor.net to this blog. During this process I also moved the domain name to a new host. I thought I would outline the process in case you come across a similar situation.

I first notified my new host, f2o.org, of my intentions. I asked that Dan, the owner of f2o, if he could set things up on his end ahead of time. He created a pointer of sorts from the domain putertutor.net to robinsblog.com on his server. I also asked that he setup mail forwarding so that mail to robin at putertutor dot net would be forwarded to my ISP email address. I did this so that when I made the DNS change at GoDaddy there would only be a brief downtime for the site. I will explain more about the DNS later.

The 404 Error Page

I had to create a 404 error page. This is the page that is displayed when a file cannot be found on a web server. I knew that a lot of putertutor.net visitors had a variety of pages bookmarked on their computer and I did not want them to receive the default Internet Explorer 404 error page. I created a custom error page, you can see the page at http://www.robinsblog.com/404.htm.

I styled the page to match the rest of the blog. I used absolute URLs for images and CSS links because the page would be loaded from various folders on the site and I wanted to ensure that the associated images and css files could always be found.

Because I knew that a lot of visitors would be looking for specific resources, I tried to provide them with links to some of the more popular portions of the site on the 4o4 page. Because I know that many of the visitors are loyal Paint Shop Pro users, I included my plans for tutorials and resources in the future and where they would be able to find these future resources.

I also included a search engine on the page so that visitors could search the site to find what they were looking for.

Finally, I included a method for people to contact me either via email or through the comment system on the blog.

Meta Refresh – Redirecting Visitors

Some people also add a meta refresh tag to redirect visitors automatically from the 404 error document to the home page of the site. I opted not to use meta refresh at this time, instead giving users the choice of where they want to go on the site. If you want to use a meta refresh tag for redirection the tag must be placed in the head section of your document. The meta tag itself looks something like this:

[code]
http://www.robinsblog.com/">
[/code]

2 is the number of seconds before the redirect is made. url is the site or page you want the visitors to be redirected to. I would recommend that any time you move content, you use a meta refresh statement to redirect visitors to the new location of the content. You can learn more about various meta tags at the Web Design Group or at tinkertech.net. An .htaccess file can also be used to redirect visitors to different pages.

The .htaccess file

In order to make custom 404 error pages work, a text file called .htaccess must be created. This file tells the browser where the error page is located. To create the .htaccess file for custom error pages, open TextPad, NotePad or your favorite text editor and add the following line of code:

ErrorDocument 404 /404.htm

Replace 404.htm with the name of your custom 404 error document. Save the file as .htaccess in the root of your web site. When you save the file, make sure that the .txt file extension is not appended to the end of the filename. If you set the text editor’s save as file type to “all files” instead of Text File (.txt) the extension will not be added. Upload the 404 error document and the .htaccess file to the root of your remote web site.

The .htaccess file can be used to control a variety of other server options. You may want to use a different file name for the default index page of your site or a particular folder. Usually, index.htm or index.html is used, but you may want to use a PHP file instead. You can set the directory index page with this statement:

DirectoryIndex index.php index.html index.htm

This forces the server to look for and display files in any folder on your site called index.php, index.html, and index.htm.

You may want to prevent hotlinking of images on your site or to prevent directory listing.

The .htaccess file can also be used to password protect directories, deny access to folders, to redirect files, and to deny visitors from certain IP addresses. You can learn more basic information about .htaccess at freewebmasterhelp.com.

Transferring the DNS

I backed up all of the files that were currently on putertutor.net. Last week I made an announcement about the site closing and I sent out an email message to folks on my mailing list. After the announcement email was sent I deleted the mailing list for privacy purposes.

Once my error pages were working and I felt that the announcement had been posted for an adequate amount of time I deleted all content on putertutor.net. While the content was being deleted from the server I went to GoDaddy.com, where my domains are managed, and I changed the DNS (set the Name servers) from addr.com to f2o.org.

To avoid getting too technical, the DNS points the domain name to the hosting company. When you buy a domain name you will need to set the name servers (DNS) to point to the hosting company servers. When you sign up for hosting services, the host will provide you with the DNS addresses for their servers.

It usually takes about 24 hours for the DNS to propagate around the world. This means that the site may not be available for about 24 hours. After I made the DNS switch at GoDaddy, it took 15 minutes for the site to be redirected here, but I doubt that it was available all over the world.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • StumbleUpon
  • Design Float
  • Reddit
  • Twitter
Leave a Reply 688 views, 2 so far today |
Follow Discussion

6 Responses to “Server Move”

  1. David Hucklesby Says:

    Miraz Jordan writes on Wise-Women about creating and using the .htaccess file. You may find her explanation easier to follow. (It’s shorter ;-) )

    http://www.wise-women.org/tutorials/htaccess/

  2. Robin Says:

    Well, I apologize if my explanation was unclear. I’ll work on rewriting the article.

  3. Angie Says:

    Hope you redo the psp 8 tuts too. I dont have 9 and after buying 7 and then 8 I have no intentions of learning a new one. Good luck with the new site.

  4. David Hucklesby Says:

    My apologies, Robin.

    I was referring to the freewebmasterhelp.com website explanation of .htaccess, *not* your “how-to” which is clear.

    Sorry for the confusion.

  5. Jim Kelly Says:

    Works great on the unfinished part of my F2O dreamweaver projects site. Thanks.
    Makes more sense to automatically redirect a user, then to have them “back out” !

Trackbacks

  1. Take My Advice - I’m Not Using It! » Cheatsheets and More Resources  
BubbleRelaxPlasmaBubbleDripPlaying with Water and LightPlaying with Water and LightPlaying with Water and LightPlaying with Water and LightPlaying with Water and LightwetJust Posing