Support » Requests and Feedback » WordPress should automatically add http:// in the URL if the user misses it

  • I will give a real life scenario I faced:

    In my website:

    I tried adding a hyperlink in one of my blog posts. So, I pasted this in the URL box of the visual editor:

    WordPress neither corrected this error nor prompted me to do so. But luckily enough, I happened to check the final (published) output which turned out to be like this:

    I tried finding the error but it was very difficult to find. It was only after spending 1 hour that I realized that http:// prefix was missing in my URL which was resulting in all this.

    Can’t we have an arrangement through which the initial http:// is automatically added by wordpress whenever it is missing.

    I tried experimenting this in MS Word and found that it takes care of this problem so well. In fact, you can never have this error in MS Word.

    How nice it would be if we could have something similar in WordPress as well!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Are you using the visual editor or the HTML editor?

    The http:// is automatically included when adding links in the visual editor. However, it is also selected, so that if you just paste a link without that, it will disappear. You have to deselect it first (hit the down arrow) to preserve it.

    On the other hand, if you are pasting a URL which includes that, you need to nothing. Just paste.

    How does WordPress know you didn’t intend to put in a different URL?

    What if you want to put in or ftp://....

    There’s more than just http 🙂

    @ kjodle: I am using Visual editor. Though http:// shows up by default in the box, it gets easily replaced when we copy paste something.

    Nothing goes wrong if we do everything correctly, but the problem occurs when we omit to do something.

    It’s worth noticing how MS Word handles the URL text without http://

    @ Ipstenu: Maybe you’re right. But even then, changing the final output as mentioned in the post above (prefixing the site’s URL) is unwarranted.

    Also, It should not a problem sensing whether the user intends to use mailto: or ftp://. MS Word does that so beautifully. If your URL starts with mailto: or ftp://, it does not prefix http://



    Forum Moderator

    But what if you simply want to refer to a site/company such as but do not want to make a link? At least with the current system, you have a choice. With your approach, there would be no such choice.

    @ esmi: We are talking about the hyperlinking process that starts once you click on the hyperlink icon in the visual editor.

    If you do not want to hyperlink, don’t insert the link (don’t use the hyperlink icon in the visual editor).

    Gouri, since there’s no one-right way to do it correctly for all situations, this setup provides the flexibility we need.

    If you force http:// in, then I can’t use relative URLs (i.e. /foo/) which I shouldn’t anyway, but some people wanna. We shouldn’t nanny-gate them.

    Personally I’d like it so that when you click on add a link, http:// isn’t already selected, but the cursor’s at the end of the line :/

    Ya, looks like the relative URL thing comes in the way of implementing this suggestion.

    Keeping the http:// intact in the beginning would keep things simple, but as you said in your earlier post, it would again be a hurdle if somebody wanted to replace it with ftp:// or mailto: or something similar.

    It’s worth noticing how MS Word handles the URL text without http://

    You’re comparing WordPress to a MS product? Dude…..

    Nothing goes wrong if we do everything correctly

    Well, there’s your solution. There’s one way to do things correctly and an infinite number of ways to do it wrong. It’s kind of hard to build a system which accounts for that.

    BTW, I so detest the way that MSO handles the whole link thing (and lots else, besides), that I switched to OpenOffice. All happy now.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘WordPress should automatically add http:// in the URL if the user misses it’ is closed to new replies.