Always install WordPress on the root directory

Daniel Scocco

Unless your blog is a secondary part of an existing website you should always install WordPress on the root directory. When I created my first blog I used an automatic WordPress instalation that my web hosting company offered, but the standard installation was done on “www.domain.com/blog”.

I was not sure how this would affect the blog therefore I decided to leave things as they were. A couple of months later when I started studying SEO I realized that this was a bad move. My blog could be accessed either through “www.domain.com” or “www.domain.com/blog”, meaning that the Homepage was duplicated. Secondly Google’s Pagerank was also being divided and some aggregators like Technorati were considering the two addresses as two different blogs.

This is my contribution to the “Blogging Mistakes” project. We already have 21 people participating, if you have not submitted your entry make sure you do so. The deadline is the midnight of Sunday. I am looking forward to reading your blogging mistakes!



Browse all articles on the WordPress category or check the recommended articles for you below:

103 Responses to “Always install WordPress on the root directory”

  • uberdose

    So your problem was actually duplicate content, not the root URL of your blog. I dare to say you could install it in /whatever, put other content on / and you wouldn’t lose anything. Or just do a 301 from / to /whatever, still the same.

  • Ray Fowler

    Daniel,

    Thanks for clarifying that for me. And thanks for all the great tips on your blog!

  • Daniel

    Ray, your WordPress files are installed on the subdirectory, but the blog address is set to the root, so you are fine.

  • Ray Fowler

    Daniel,

    My blog is about four months old. I have WordPress installed in a blog directory rather than the root directory, but in Dashboard under General Options I have the following:

    WordPress address: http://www.rayfowler.org/blog

    Blog address: http://www.rayfowler.org

    This seems to take care of the problem. When I try entering the site using the /blog address, I get a 404.

    Is it okay having it set up this way, or am I missing something?

    Thanks,
    Ray

  • Daniel

    Mario, I respect your opinion. However, if that was the case, how can you explain dozens of popular blogs that use WordPress?

    Some of those blogs (e.g., TechCrunch) make more than $100,000 monthly in revenues, and I bet they pay a lot to programmers and web developers as well, just to make sure everything works. They are just paying stupid people?

  • mario

    This is an idiot advice. Not because of the root path argument, but because of the implicit recommendation of WordPress.

    That’s definitely the most bug-riddled software in existence. It even surpassed phpBB and PhpNuke security-wise. Everyone who installs that, deserves to get hijacked and content-cleansed.
    I have lost a lot of time to other douchebags on my shared hosting servers, because of that software. And mind you, WordPresses’ amateur programmers always shrug it off with ohh-it’s-not-thaaaat-a-big-a-security-risk or the NO WARRANTY GPL preamble.

    So, people – get ANY blogging software; just not WordPress!

    (check out FlatPress, S9Y or WikyBlog)

  • John Fitzsimmons

    Daniel, that’s not necessarily true. For example, I have customized the permalink structure to not include the sub folder “Blog/”.

    On one site I’m working on the structure is like the following…

    http://www.WEBSITE.com/index.php/POST-TITLE

    So why can’t I just disallow the “Blog/” folder?

    Am I wrong?

  • Jermayn Parker

    So whats the best way of doing this seeing I use cpanel to automatically install WP????

  • Daniel

    John, if you install WP on a subfolder like /blog/, all the posts’ URL will have /blog/ on it.

    Therefore if you disallow /blog/ you will be disallowing pretty much everything except the homepage :).

  • John Fitzsimmons

    This problem could be easily resolved by using a robots.txt file to disallow /blog/

    Am I wrong?

  • Ryan

    I made the same mistake when I started my wordpress site a few years ago. I had the domain name for a while and had previously hosted it on blogger and LJ. Then I moved to WP, which I adore and tell everyone about. But when I step up my WP, I did so at megorious.com/blog. The idea being to one day have something snazzy set up in my root. But that day never came. I found myself redirecting my root URL to /blog.

    After a year or so, I decided to move it all to the root, and for anyone who has done this with WP, you know how much of a pain it can be. I panicked so many times, thinking I had lost the entire thing. Thankfully, several hours later, I stopped crying…

    This is my first visit to your site. I have one suggestion (and please take this with a grain of salt). When I came to comment, I noticed you had a lot of comments I had to scroll through. This doesn’t phase me but for a lot of people it might. A simple link at the end of your post that directs them to the comment box would be nice.

    Just a thought…

  • Faye

    Can someone explain how you install wordpress on the root directory? I’m totally new to this and have not yet set one up but want to make sure I’m doing it correctly. Is there an option that says “root directory” when you go to wordpress to set it up? Thanks.

  • Rahel

    I haven’t read through all the comments yet, but I’ve seen a few that suggest that if you use the automatic install of WP that is usually packaged with cpanel, you can’t install in the root directory. Actually, you can install in the root directory. The only time there would be a problem is if there is already a blog installed there, specifically a copy of WordPress, but that would be a problem if you did the manual install as well. Just my 0.02.

  • Ashish Mohta

    How do i do a 301 redirect ? Can you tell me the code ?

  • Daniel

    Ashish, as long as your homepage page has different content than the blog on a subdirectory is OK. Sites like SEOMoz have some content on the homepage and the blog on a subdirectory.

    The problem is that my blog was the only thing I had on the site, in that case you should place it in the root directory for optimal results.

    Doing a redirect like you did is a good solution also. Just make sure its a 301 else you will lose PR.

  • Ashish Mohta

    One more thing I forgot to mention.I have see lot of sites which are in subdirectory and they do well…..Putting in root directory might give you a benift but thats not the necessity

  • Ashish Mohta

    Well then I am taking up the challenge of having my blog in a subdirectory and make it successful.I dont agree with this concept to 100%.It might affect you a little but not to an extent that you are just dead.

    Till the time you are linked, indexed and good in books of google you have the benefit.

    Lets see how my blog does.

  • Daniel

    Ronald, I dont think it applies to subdomains because you can separate the submain from the root. Just make sure that the main domain has unique content.

  • Andrea

    I’ve seen this a few times recently and I’m glad I didn’t make this mistake.

    Your blog has been a great help to me and I hope you’ll do more group writing projects in the future. Thanks!

  • Ronald Huereca

    This is very sound advice. Does this advice go for subdomains as well?

  • Malin

    Since I have one WordPress adress and another website adress stated in the Options page this hasn’t been an issue to me even if I have the WordPress installation in another folder. My permalinks doesn’t write out the subfolder, so I guess I’m okay? Or did I miss anything?

    Another thing though, is to choose to have either www or no www, I just fixed that with a 301 redirect. I should have done this a long time ago…

  • Leroy Brown

    I realized my mistake about six months or so in, so it was too late in my eyes to switch. It’s way too late now, which is a shame. To add insult to injury, I have the date in my permalinks, which bothers me every time I look at them!

  • Daniel

    Thilak, that is an idea I had for sometime hehe, there is no equivalent of the SEO Book for blogs yet :). It sure would take a lot of time to come up with something well structured, lets see in the near future!

  • Thilak

    That is certainly true, I’ve seen lots of bloggers do this mistake.

    I think, you show write a book and sell it. Nobody realizes these crucial mistakes when the just start blogging

  • Mike Panic

    When I installed WordPress a few months ago to start Randomn3ss.com, it was tempting to use the auto-installer my host has in cpanel, however I wanted it to be in the root directory. Every reason above is why I did it, as well as it being easier for my readers to find the site.

  • Daniel

    Ben, the best thing is to avoid falling into that pitfall altogether.

    If you did that but the blog is new (i.e. not a lot of backlinks poiting to it) I would suggest moving the WordPress installation to the root directory even at the cost of losing those links.

    If you did that mistake and realize only when the blog is already mature (which was my case) you can either use the http://www.domain.com address to set up a welcome page and leave the blog on http://www.domain.com/blog or you can try to fix everything with 301 redirects, but that would be a mess because its not just a matter of redirecting the /blog foler to http://www.domain.com since you will also need to take care of all the single permalinks, images and so on.

  • Ben Evert

    So, How would you fix that problem? Would you delete all the folders on the server and reinstall wordpress using the non-automatic copy? Or, Just move wordpress out of its’ ‘blog’ folder? I’m in the process of setting up a new blog on a different host and would like to know.

  • Daniel

    Mark, I think so. I know you can preserve Pagerank and incoming links as far as search engines are concerned, but Technorati seems to have a more obsolete ranking mechanism.

  • Mark Alves

    Do you know if the Technorati penalty applies even if you 301-redirect from the old URLs to the new ones?

  • engtech

    also, if you change your blog url AT ALL you lose your Technorati rank.

Comments are closed.