close

Privacy guaranteed - Your email is not shared with anyone.

Max length of host name in URL?

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


  1. Jack Straight

    Jack Straight
    Expand Collapse

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

    9mm Luger
    Expand Collapse
    GLOCK 26

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

  3. grokdesigns

    grokdesigns
    Expand Collapse

    Joined:
    Dec 23, 2004
    507
    0
    Location:
    Chandler, AZ
    Taken from: http://www.boutell.com/newfaq/misc/urllength.html
     
  4. David_G17

    David_G17
    Expand Collapse
    /\/\/\/\/\/\/\/

    Joined:
    Oct 7, 2002
    2,046
    0
    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
    Expand Collapse
    (null)

    Joined:
    Jun 25, 2000
    55
    3
    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
    Expand Collapse

    Joined:
    Aug 3, 2004
    4
    0
    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
    Expand Collapse
    Dealer

    Joined:
    Sep 25, 2004
    91
    0
    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
    Expand Collapse
    (null)

    Joined:
    Jun 25, 2000
    55
    3
    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