I've recently come across a few questions on Stack Overflow that contain invalid links as examples relating to the question:


Because OPs use the "http://www." in front of the URL, Stack Overflow seems to think it's a link, even though the destination of the link is not related to the question in any way, which I would say is bad for SEO.

Should questions with such content be edited? (removing the http://www. so that the URL does not appear as a link in the post?)#

Example: URL showing wordpress directory - Can I remove this?

  • 1
    Without seeing examples, the most appropiate course of action would be to code-ify (TM) the URL; e.g. turn foo.com into http://foo.com – Matt May 16 '12 at 12:26
  • 7
    Isn't example.com the correct thing to do? (en.wikipedia.org/wiki/Example.com) – Flexo May 16 '12 at 12:44
  • 1
    @Matt code-ifying turned out just what doctor ordered for the example that has been provided after your note - I edited it, works like a charm – gnat May 16 '12 at 14:13

Should questions with such content be edited?

If you are just editing the post to remove the http://www part from the links that don't take to any real page, or to change the domain name to example.com, then I would say you should avoid editing those posts. If there is something else to edit, and you also change the domain name to example.com, then I would say the edit is acceptable.

I would not worry about links taking to not existing pages, if not in one case. Suppose that a question is about something noticed in a web site for which the OP provides the link, such as the following question:

I want to implement the image carousel used on http://domain-name.com/page.html. How do I do it?

If the question doesn't have any screenshot that shows the type of image carousel seen in that website, and the link returns an error, then the question could be closed as too localized. I would not bother editing the link, in such case.

As side note, there is already a mechanism to warn users about wrong links, which checks the domain name. Try using http://www (without closing it between back ticks), and you will get the following error message.



I think it is the responsibility of the OP to perhaps wrap these dummy URL's in back ticks to disable the automagick-create-a-link functionality (might need to find a better name for that :).

This issue reminds me of this post - Are IP address links valid in posts?

From the data collected it seemed to be clear that the majority of these links were dead already and from now, IP address links are not allowed... I even got a comment by the community user on a post of mine in the formatting sandbox to that effect.

Essentially there is not much that can be done about people posting "real" URL's that are actually dummy "place holder" URL's... For the system to detect invalid URL's it would have to ping each and every URL that is entered in any post (massive overhead) and even if that happens, many of these "dummy" links are actually real!

http://example.com and also http://example.org are 100% valid URLS!

I don't think it would be feasible to implement this as part of the system. A better solution would be to simply edit these posts and wrap the "offending" URL with backticks...

You must log in to answer this question.