datadirt RSS Feed
3,931 happy readers
Subscribe now
Twitter
48.237 Followers
follow now

Social media triX: turn subdomains into profile URLs

11.11.2008, written by Ritchie Blogfried Pettauer, 2 Comments

Profil-Redirects mit SubdomainsA cou­ple of social net­works offer nice, human read­able pro­file URLs, but most still don’t. And since nobody is going to remem­ber a link like http://www.facebook.com/profile.php?id=717807375, it’s a good idea to use a redi­rect: this way, Face­book and other URLs are much eas­ier to remem­ber in an offline talk for exam­ple. If you’re run­ning your own site using your own domain, it’s very easy to set up a sub­do­main which points to your pro­file. facebook.datadirt.net opens my fb-profile page — here’s a quick check­list on how to do that.

This kind of redi­rec­tion is suit­able for all kinds of links which you want to shorten and/or make eas­ier to remem­ber. There are no dis­ad­van­tages what­so­ever, as we are going to use a per­ma­nent redi­rect: this means that Google will not index the sub­do­main and hence there’s no dupli­cate con­tent prob­lem. I’m using my own Face­book URL as an exam­ple for the fol­low­ing instruc­tions — caveat: Your server has to run Linux and the apache rewrite engine must be enabled.

  1. Add a new sub­do­main: the way you set up a new sub­do­main depends on your web hoster. Usu­ally it’s done via some admin­is­tra­tion inter­face. Basi­cally, a sub­do­main points to a sub­di­rec­tory of the domains root-directory. In this exam­ple I added the new sub­do­main “facebook.datadirt.net” using the direc­tory www.datadirt.net/facebook/
  2. This direc­tory is going to con­tain just one file which you have to edit now. The name of the file is .htac­cess (that’s an Apache stan­dard nam­ing con­ven­tion) and it con­tains the instruc­tions that point the user to the des­ti­na­tion URL. It takes only one line using the fol­low­ing syn­tax

    Redi­rect per­ma­nent CURRENTDIRECTORY TARGET-URL

    In this exam­ple, the con­tent of the .htac­cess file is:

    Redi­rect per­ma­nent / http://www.facebook.com/profile.php?id=717807375

  3. There’s no third step — you’re done. Don’t expect your new sub­do­main to work right away though: because of the way the DNS sys­tem works there might be a delay of up to 24 hours until the new sub­do­main works. But you can instantly test your setup by enter­ing the absolute URL, in this case:

    http://www.datadirt.net/facebook/

  4. Mul­ti­ple redi­rects: Of course you can set up mul­ti­ple sub­do­mains (on mul­ti­ple servers) and have them all point to the same pro­file. I added another sub­do­main to my per­sonal site which also points to my Face­book pro­file: facebook.pettauer.net

    How to edit your .htac­cess file using Win­dows: If you’re using Win­dows, there is no chance of nam­ing a file .htac­cess as Win­dows requires at least one char­ac­ter before the dot. So use a name like temp.htaccess, edit the file, upload it to your sub­do­main direc­tory via ftp and then rename it to .htac­cess on the server. Or you can use a command-line tool and edit the file via a ter­mi­nal window.


So far, 2 Comments on "Social media triX: turn subdomains into profile URLs" haven been posted by my readers.

What\s your take?
  • Alex- The Blog Traffic Guy Identicon Icon

    This is a very good idea for get­ting peo­ple to remem­ber my face­book page and to show peo­ple some author­ity that I have a site too. That’s cool and can be done simply.

    I haven’t been good in gen­er­at­ing traf­fic and buil­do­ing com­mu­nity with face­book. But I’ll learn more from your blog :grin: Thanks!

    Like or Dis­like: Thumb up 0 Thumb down 0
  • fdhr Identicon Icon

    it’s very usefull :!:

    Like or Dis­like: Thumb up 0 Thumb down 0
Write a Comment

:frog: :frog2: :frog3: :frog5: :frog6: :frog4: :frog7: :white: :mrt: :smoking666: :borg: :ninja: :satan: :saint: :elvis: :king: :pimp: :pirat: :mrdj: :elk: :cool: :geek: :weird: :mad: :sad: :-? :shock: :anonym: :poke: :angel: :kiss: :love2: :coffee2: :white2: :dog: :cat: :ccocktail: :beer: :thumbdown: :thumbup:

0 Track- and Pingbacks for this posting

  • Ping me, please! Just add /trackback/ to the URL of this posting.
?
datadirt.tribe
         Login | Register
via RSS datadirt RSS Feed
via Newsletter
aweber
EnglishFrenchGermanItalianPortugueseRussianSpanish
Newest Postings