Here is a very nice scheme of what an URI is:
origin __________|__________ / \ authority | __________|_________ | / \ userinfo host resource | __|___ ___|___ __________|___________ | / \ / \ / \ username password hostname port path & segment query fragment | __|___ __|__ ______|______ | __________|_________ ____|____ | | / \ / \ / \ / \ / \ / \ / \ foo://username:password@www.example.com:123/hello/world/there.html?name=ferret#foo \_/ \ / \ \ / \__________/ \ \__/ | | \ | | \ | scheme subdomain \ tld directory \ suffix \____/ \___/ | | domain filename