Welcome to WebmasterWorld Guest from 50.16.78.128

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

mod rewrite short.tld > very-long-domain-name.tld

   
11:40 pm on Jun 5, 2010 (gmt 0)

5+ Year Member



hi

We've got a site with a long domain which wants to use a short url (have short domain name) to link to every page on the long domain ie.

[short.tld...] > [very-long-domain-name.tld...]
[short.tld...] > [very-long-domain-name.tld...]
[short.tld...] > [very-long-domain-name.tld...]
[short.tld...] > [very-long-domain-name.tld...]

Both domains are hosted on the same private server.

Is there a standard rule that would accomplish this?
Since pages are constantly being generated on very-long-domain-name.tld, are there any existing tools/methods that can assign a unique short url to update real time?

Any ideas appreciated

Thank you
12:09 am on Jun 6, 2010 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



It has to all be done within the PHP scripts on the site itself.

There's no way for
.htaccess
to be able to know that a URL request for
/UB349
refers to the internal filepath
/folder305/folder18/filename38294.htm
inside the server.
2:20 am on Jun 6, 2010 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



If we're talking only about the domain name itself -- say, "www.very-long-domain-name-here.com" and you want to redirect some short domain name like "short.com" to that, then there may be a big mistake here before coding even starts.

Either promote the long domain name and link only to it, or promote the short domain name and link only to that one. You can do things like publish the short domain name in print and on TV/radio where the assumption is that it will always have to be typed-in, and then redirect those requests to the proper "branded" domain, but don't link to or promote any domain on-line that is not your "branded money-domain."

This is an SEO issue, best discussed in one of our search engine forums, but the bottom line is that if you promote and link to both domains on-line, then you are essentially creating "extra competition" for your own site in the form of multiple URLs competing for links and for search engine rankings. Plus, search engines take a dim view of a company that cannot make up its mind what it wants to be called on-line -- One company, one domain is the general rule, unless you are really huge (like General Motors with GMC.com and Chevrolet.com, for example).

Invoking a redirect from short.com to exquisitely-long-and-sinuous.com for every request also wastes your visitors' time and makes a mess of your logs and stats, because every initial client request results in a server response saying, "Nope, sorry. No can do. That resource has moved, please ask for it again at this new URL... This HTTP connection is now closed, Good-bye. Please call again soon." The client must then open a second HTTP connection and re-request what it wanted in the first place, now using the new URL provided in the server's redirect response... Big waste of time and bandwidth, and your "server hit count" essentially doubles. Both client requests get logged, skewing your stats, and Google and the other search engines will think that your site is a technical mess. This would likely constitute a "negative signal of quality" in their eyes.

Jim
7:20 am on Jun 6, 2010 (gmt 0)

5+ Year Member



The use of the short url is required for Twitter. The short URLs will be tweeted and not used for other purposes but it's essential the longer main domain is used for general www & email, the short (not so user friendly as reader can't see much about file name or path) is just for tweeting.

Surely a lot of sites are already doing this?

Thank you for your comments.
7:40 am on Jun 6, 2010 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Twitter doesn't require short URLs these days.

They will auto-shorten anything over 138 characters, however if your URLs are already quite long you'll want to shorten them to leave room for the rest of the message.

You'll need a script that looks in the database for the new URL when a short URL is requested, and then sends the HTTP 301 redirect header pointing to that new location.
7:50 am on Jun 6, 2010 (gmt 0)

5+ Year Member



The 140 character limit tweet will include both the short url and the tweeters comment (so needs to be extra short). Thanks for the comments.
8:05 am on Jun 6, 2010 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



I was just clarifying that "The use of the short url is required for Twitter." means that you are "using short URLs with Twitter" and not "Twitter requires short URLs".