Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I ran into a website today that had two URLs and I'm completely stunned. The website, not to be specific, has a full address of http://example/cat/http://example/dog. I will say that the first part is a randomly generated ad that pops up, but regardless isn't going to two addresses the equivalent of being at two different houses at the same time i.e. impossible? Anyhow, I just wanted some clarification on how it works.

And before you ask, the site is not exactly something that I would paste on an affluent forum thus the reason I have left it out.

share|improve this question
http is the URL scheme/protocol. It's not a header. – Lèse majesté Jan 18 '12 at 7:16
What @Lèsemajesté said. Also the example couldn't possibly work as a valid URL; you might want to correct that. And what does the "first part" refer to? (example? cat? The http?) The "randomly generated ad" bit is also unclear. – Su' Jan 18 '12 at 10:22
I edited the title, view history to make sense of @Lèsemajesté's comment. – paulmorriss Jan 18 '12 at 11:45
up vote 6 down vote accepted

Your example URL, http://example/cat/http://example/dog, points to a page accessed with the http protocol, on the host example, with the path cat/http://example/dog. It's perfectly valid for the path part of a URL to contain elements that look like the protocol and hostname parts of another URL.

One relatively prominent example of a legit site using such URLs is archive.org's Wayback Machine. For example, to see what http://webmasters.stackexchange.com/ looked like in late 2010, you can go to http://web.archive.org/web/2010/http://webmasters.stackexchange.com/.

share|improve this answer

The second one can simply be a parameter in the URL.

share|improve this answer

People also often see "http" in their access logs when the forget the colon in a link to an external site. For example on the page http://example.com/finder/findstuff is the following HTML:

<a href="http//www.google.com/">Search Google</a>

Due to the missing colon, this will result in the visitor being sent to http://example.com/finder/http//www.google.com/ when clicking on the link.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.