Thursday, April 11, 2013

Free HTML Editor Software

When updating my website  I wanted to write code so that it would validate as being properly written in version HTML 5,  at least for the main webpage. In order to do that I needed to include this tag between the head tags of my HTML files:

<meta charset="UTF-8">

I wrote my HTML code in Notepad and by default Notepad encodes files, including HTML files, in ANSI instead of UTF-8. Notepad does have the option to save in UTF-8 encoding, but not the right kind. Don't ask me what all this stuff means because I haven't got a clue, all I know is that I needed to find a word processor which will save HTML files in the kind of UTF-8 encoding  that would make my webpage pass the test.

In my search I came across Notepad 2. It's completely free and is a simple but pretty handy  little HTML editor. By little I mean it's only around 300kb and can be kept and run off  a usb drive without any  installation needed, I just downloaded the zip file from www.flos-freeware.ch/notepad2.html, unzipped it and launched the program by clicking on its icon ( I downloaded the 4.2.25 Program Files (x86) zipped version).

Some of its features:
  • auto inserts closing tags (saves you some finger work)
  • unlimited undo and redo (something that comes in handy for me)
  • syntax highlighting to help you catch coding errors

Sorry Apple fans, Notepad 2 is only for Windows but I'm sure there's something similar for you Macheads too.

Oh yeah, and I forgot to mention, it encodes in the kind of UTF-8 I needed, which was why I was  searching for a new HTML editor in the first place. It's now become my main editor for writing HTML, but I still think plain old Notepad is pretty good, as long as you don't use <meta charset="UTF-8">

Screen Shots

 



Tuesday, April 2, 2013

How To Tell Google WebSite Has New Domain Without 301 Redirect

When I decided to get a domain name for  my website HTML Made Easy I faced the problem of how I was going to get Google to replace the old url with the new domain. Usually it's done with a 301 redirect but I didn't have that option because my site was located on the web space that came with my internet account. My site was already doing well in Google searches so I needed to find a way for Google to list the new domain instead of the old web address.

I did a bit of googling (well actually a lot of googling) and I found the solution - use canonical rel tags on the pages of the old site. The purpose of this tag is to give webmasters the option of telling Google which page they would rather see listed if they have 2 identical webpages. Take for  example a website selling shoes, one page may list the shoes by price while the other page lists them by brand. If Google crawls the webpage with shoes listed by price and sees the canonical tag pointing to the webpage listing shoes by brand, Google will know that the webmaster prefers the brand page be listed in search results and not the price page.

This is just what I needed and Google approved, within a couple weeks the new domain began replacing the old url in Google search results.

The canonical rel tag goes between the head tags of the webpages that are showing in search results but that you want replaced. This is what the canonical tag looks like:

<link rel="canonical" href="http://www.newdomain.com">

That code would be placed in index page, replace www.newdomain.com with the url of your new domain. All the other pages you want replaced in search results must contain the exact url  of the matching  webpages on the new domain:

 <link rel="canonical" href="http://www.newdomain.com/gallery.html"> 

It's important to note that the content of the new webpages must be identical to the webpages they are replacing. If they are not Google may think that the pages on the new domain are not a good match for the keywords under which the old pages are showing. You will find more information about the canonical tag on Google's support page.