Redirect a website domain easily (301/302)

If you have multiple domain names that you need to point to one website, a popular way of doing so is with a redirect. There are two types; a 301 permanent redirect or a 302 temporary redirect. Both redirect; however are intended for different purposes. Redirects also work for any hyper-link; however I am going to speak from a domain perspective.

301 Redirect

A 301 redirect will redirect a domain name to another domain name; that is to say it will replace a domain name with another. A 301 is a permanent redirect; so any search engine (Google, Yahoo, Bing) bot scanning the redirect will also pick-up that the website domain is redirected to another domain; and will in course update its search index.

Here is an example of how to place a 301 redirect in your htaccess file on your server. This line of text should be place on the root level of the domain you wish to replace. If you were wanting to redirect a certain page within the domain; you could place the page name (i.e. about.html) directly after the slash (/).

301 Redirect to website domain htaccess - Scott Alexander Robertson

302 Redirect

A 302 redirect will redirect a domain name to another domain name; however is only intended as a temporary redirect. Only use this type of redirect if you intend to bring back the website on the domain you are redirect at a later stage.

The theory follows the same for a 302 redirect; however instead of 301 being used, 302 is.

302 Redirect to website domain htaccess - Scott Alexander Robertson

Find Hex Colour Quickly

For a project I was working on the other day; I wanted to find random colours and use there hex codes. I came across this cool little site; a good resource for a designer to have.

http://colorrrs.com

 

The developer, Jamie Brittain, also has a site where you can easily convert hex codes to rgb, very useful.

http://hex.colorrrs.com

Both great sites to know about!