[wp-hackers] Two new, long-overdue plugins to make your wordpress life a little easier...

Otto otto at ottodestruct.com
Fri Oct 28 16:44:00 UTC 2011

On Thu, Oct 27, 2011 at 8:45 PM, Marcus Pope <Marcus.Pope at springbox.com> wrote:
> Blown away by the dozens of posts from Core WP developers that root relative urls are not possible

I don't know anybody who's said that they're "not possible". However,
we do tend to all say that they're a *bad idea*. Which they are.

Using relative-urls, even root relative ones, makes an inherent
assumption that your content is only viewed on your website itself,
and only in the context of a web browser. This is not necessarily a
correct assumption. Furthermore, by making this assumption, you limit
the scope of your content unnecessarily.

While I'm sure you probably considered the feed-reader case (where
your content is not displayed in the context of your website and so
your URLs may not be handled properly by the reader), you may not have
considered other cases. What happens when your content gets converted
into a book, or print? Having the actual full URL, even in the print,
would be nice to be able to drive traffic back to your site. Things
like that, things you didn't think of for the future, are reasons why
not to use relative URLs.

The only reason to use relative URLs, in fact, is for migration of
content from one domain to another. And realistically, this isn't
something you should be doing often anyway. And by using root-relative
URLs, you limit this case to only migrating content at the same level
to begin with. Domain changing only, basically. So it's kind of
pointless to do.

A fully qualified URL works every time, everywhere. It's easily parsed
by search engines. It works in feed readers. It works no matter where
your content is displayed.

You most certainly *can* use relative URLs. You just *shouldn't*.


More information about the wp-hackers mailing list