How To Redirect to a Website

Apr
2009
16

posted by on Tech Related, The Net

13 comments

After posting my new Twitter background I got a few e-mails from people asking me how I made www.BobBuskirk.com/facebook go to my facebook page. It is really a really easy thing to do and when you do it you are putting your brand first which is really important. Also it makes remembering URL’s really simple. No one wants to try and memorize someone’s facebook URL or any other long URL like that. So making a redirect using your blog or website is so much easier and like I said it’s putting your brand first so people will remember BobBuskirk.com. So there are a few different ways to actually do a redirect. I will go over just a couple in this small tutorial.

The redirect method I like the best is .htaccess redirect. On your webserver you should see a .htaccess file. If there is not one, just go ahead and create it. Then open it up to start editing. Here is the code that I am using for my redirects…

Redirect 301 /flickr http://www.flickr.com/photos/enigma5
Redirect 301 /facebook http://www.facebook.com/profile.php?id=64701175
Redirect 301 /linkedin http://www.linkedin.com/in/enigma5
Redirect 301 /twitter http://www.twitter.com/bobtv

You can see the coding is pretty simple and easy to use. You can make as many redirects as you want. Another really easy redirect method is the meta tag redirect. The only catch with this is you need to create a file for it to work. So if I wanted to use BobBuskirk.com/flickr with this method I would have to create a /flickr directory on my webserver and then add an index.htm file there with the following code in it.

< meta http-equiv="refresh" content="1; url=http://www.flickr.com/photos/enigma5" >

So when someone would go to BobBuskirk.com/flickr it would load the index.htm file then be directed to the appropriate page. The content=”1 is how many seconds till the redirect happens.

Related posts:

  1. The Website is Down!
  2. 3 Reasons Why Your Website Isn’t Making Money
  3. 3 Things Every Website Should Have
  4. The Website is Down – Sales Demolition
  5. How to Promote a Website
  • http://designawardsgallery.com/ Best CSS Gallery

    Awesome, thank you

  • http://www.jondaniel.net Jon

    Everyone keep in mind a few things though. First is that if you are running in a Windows hosting environment, that IIS does a 302 redirect by default (a temporary redirect). Sites like Google won’t index these links properly because they are only for “temporary” redirects, like in the event of migrating services from one server to another.

    Lastly, avoid meta redirects unless they are your only option. Again, Google won’t index them properly and sometimes it may knock your site down because using a lot of meta redirects is usually an indicator that the site is doing something malicious.

    Good post Bob, sound like a decent idea for keeping all of your external sites in order.

  • http://www.komodo-dragon.net/ Komodo Dragon

    Hi bob, do you know if its possible to achieve this redirect on wordpress? Without having to mess with the .htaccess?

    Thanks,

    Jean

  • http://www.jondaniel.net Jon

    Jean, it may be possible but it is a much less effective method of redirecting because it is depending on code at the application level. An .htaccess redirect will continue to function even if something goes terribly wrong with your WordPress installation.

    Just my $0.02.

    Jon’s last blog post..Subverting Large If Blocks To Do Your Bidding

  • http://www.greenteadesign.com/kitchen-cabinets.html Kitchen Cabinets

    Very insightful again Bob will be sure to look into doing this for my own site.

  • http://www.bloggingwithchris.com Ricky Peterson

    I will surely Implement this on my website, thanks for sharing information it was really useful post from youe end.

    Ricky Peterson’s last blog post..Google monopoly unfavorable for web marketers

  • http://www.komodo-dragon.net Komodo Dragon

    Thanks for the response Jon, I guess I was just being lazy with the wp fix, it does make more sense to do it the manual way. Thanks!

    Till then,

    Jean

  • http://portablecolorscanners.blogspot.com/ portable color scanners

    yes,doind it manually really makes more sense to me also

    portable color scanners’s last blog post..What to Look at When Buying a Portable Color Scanner

  • http://www.romanolawfirm.ca/ Personal Injury Lawyers

    I think this is not possible.

  • http://www.flightnetwork.com AA @ Discount Airfares

    Hey that’s a really sweet idea.

    I’m thinking or setting up redirects for all my twitter / facebook / myspace / youtube accounts etc.

    Much easier to put them on a business card that way.

    I really like this idea, thanks!

  • http://www.romanolawfirm.ca/ Personal Injury Lawyers

    I will consider your suggestion and try it out.

  • http://www.v2interactive.net josh zehtabchi

    great tips, i’ve been using the meta refresh for years. great shortcut!

  • http://www.greenteadesign.com/kitchen-cabinets.html Kitchen Cabinets

    wow great! now i know how redirecting works.