Max length of host name in URL?

Discussion in 'Tech Talk' started by Jack Straight, Dec 16, 2005.

  1. Jack Straight

    Jack Straight

    Messages:
    86
    Likes Received:
    0
    Joined:
    Feb 12, 2003
    Location:
    California, USA
  2. 9mm Luger

    9mm Luger GLOCK 26

    Messages:
    626
    Likes Received:
    0
    Joined:
    Oct 4, 2005
    Location:
    NW Indiana
    to my knowledge no. I've seen some lengthy URLs.
     

  3. grokdesigns

    grokdesigns

    Messages:
    507
    Likes Received:
    0
    Joined:
    Dec 23, 2004
    Taken from: http://www.boutell.com/newfaq/misc/urllength.html
     
  4. David_G17

    David_G17 /\/\/\/\/\/\/\/

    Messages:
    2,046
    Likes Received:
    7
    Joined:
    Oct 7, 2002
    http://3.141592653589793238462643383279502884197169399375105820974944592.com

    is a long one.

    edit: so long that GT's software messes it up (added space after the dot?)
     
  5. darth_rifle

    darth_rifle (null)

    Messages:
    62
    Likes Received:
    17
    Joined:
    Jun 25, 2000
    Location:
    Metro NYC Area
    IIRC, each DNS path component is limited to 63 characters, while the entire FQDN is limited to 255 characters.

    As for the length of a complete address (protocol, host, port and path), I have seen Internet Explorer choke on URLs longer than 16384 characters.

    - D. Rifle
     
  6. razol

    razol

    Messages:
    4
    Likes Received:
    0
    Joined:
    Aug 3, 2004
    The domain name limit is 64 characters, but the dot and the TLD (domain suffix) are inculded in that sum. There you can have one more character in a .com (four cahracters for the suffix) than you can in a .info (5 characters). This is more relevant in longer but more obscure TLDs like .museum (7). Practically, I cannot see anyone using a 64 character domain name.
     
  7. PanamaDave2

    PanamaDave2 Dealer

    Messages:
    91
    Likes Received:
    0
    Joined:
    Sep 25, 2004
    Location:
    CO
    http://tinyurl.com

    I looked to see if they had any FAQ or mention of character limitations. I did not see any so thought I would perform a quick test to see if they had any limits. Doesn't seem to be any limitation as I tested w/ 17,775 characters resulting in a 24 character url.

    =============================
    TinyURL was created!
    The following URL: "Deleted for post brevity"
    has a length of 17775 characters and resulted in the following TinyURL which has a length of 24 characters:
    http://tinyurl.com/cla2g
     
  8. darth_rifle

    darth_rifle (null)

    Messages:
    62
    Likes Received:
    17
    Joined:
    Jun 25, 2000
    Location:
    Metro NYC Area
    Safari 2.0.2 couldn't handle it (Mac OS X 10.4.3).

    All tinyurl.com does is send out a "Location:" header that causes the browser to load the real page, so I wouldn't think tinyurl.com would impose any serious restriction regarding length that a browser would support. Seeing how they're using PHP and probably MySQL for the database they're most likely using a TEXT field that supports strings up to 65536 characters in length to hold the "real" URL -- far in excess of what the HTTP specification allows for a "GET" operation.

    - D. Rifle