Support » Fixing WordPress » Don't put blog-URL in front of www-links.

  • Resolved nick_names


    This has happenend to me more then once: I add a link in a blogpost not noticing that it doesn’t start with http:// but with www. only, e.g.

    When I publish the article WordPress changes the link from to resulting in a 404.

    Live example here (link on the pic/gif):

    Is there any way to prevent this?

    Wait and if I put http:// in front of the url WP changes it to www.? (link on first word β€žLink.β€œ in text).

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator James Huff


    Volunteer Moderator πŸš€

    Not really, that’s how URLs are supposed to work. http:// is what establishes it as an absolute URL.

    If you leave out http:// it’s a relative URL, meaning relative to where it is.

    As you’ve seen, if you put in was an URL, it will be a link to

    If you put it in as just every browser will assume it’s

    As relative URLs are a valid thing, you include a URL as /images/funnyimage.jpg because it’s actually at, there’s no way to override the behavior.

    Thanks for the answer!

    I undertand that /images/funnyimage.jpg changes into that’s how it always works, I think.

    But the problem is not with URLs like but with I think in a normal HTML file a href="" would just link to and not (why would I want that?)

    Shouldn’t WP treat www. just like http:// and see that it is an external domain and not put in front of it?

    Moderator James Huff


    Volunteer Moderator πŸš€

    Right, it’s still a relative URL without http:// or https:// that’s just how browsers work in general, and I don’t think there’s any plans to make WordPress the exception to that rule.

    I agree it would be nice, and maybe someone should make a plugin for it, I just don’t see WordPress itself adopting its own protocol in this regard.

    Wow, you’re right, I’m so sorry. HTML-only is the exact same thing.

    Well, consider this issue closed, I guess : (

    Moderator James Huff


    Volunteer Moderator πŸš€

    You’re welcome!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Don't put blog-URL in front of www-links.’ is closed to new replies.