Always install WordPress on the root directory

By 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!

Monetize Your Site




Share

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

  • engtech

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

  • Mark Alves

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

  • 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.

  • 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

    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.

  • 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.

  • 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

  • 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!

  • 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!

  • 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…

  • Ronald Huereca

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

  • 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!

  • 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.

  • 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.

  • 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

  • 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

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

  • 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.

  • 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.

  • 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…

  • John Fitzsimmons

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

    Am I wrong?

  • 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 :).

  • Jermayn Parker

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

  • 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?

  • 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)

  • 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?

  • 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

    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,

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

  • 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.

  • Wellness

    Hey

    I was surfing the web and i saw this site, pretty cool.
    Currently im running and adult site:Wellness
    k, just want to say hi 🙂
    Can i link you from my site? im looking for quality content like yours. If no let me know if i can add u in exchange for a montly fee or something.

  • atribut957

    1000 ôîðóìîâ 2 äîëëàðà 5000 ôîðóìîâ 8 äîëëàðîâ 10000 ôîðóìîâ 13 äîëëàðîâ 50000 ôîðóìîâ 50 äîëëàðîâ
    Ðåôïðåäëîæåíèå: ÷åëîâåê êîòîðûé ïðèâåäåò ìíå êëèåíòà áóäåò ïîëó÷àòü 10% îò çàêàçà êëèåíêà!!!
    Îáðàùàòüñÿ íà ìûëî forumdispatch(ãàâ)yandex.ru

    1000 forums of 2 dollars, 5000 forums of 8 dollars, 10000 forums of 13 dollars, 50000 forums of 50 dollars
    Referral: the person involved to me the client will receive 10 % from its order!!
    e-mail forumdispatch (dog) yandex.ru

  • Lana

    Daniel, thank you so much for this post. I knew something is not right, my site is not getting any attention from anywhere. Now I know why. In the beginning I’ve run my site thru W3 validation site. It pointed on adding additional “/” somewhere in the address. I don’t know these things, so I’ve asked someone to do it. He said “It’s not elegant”, but reluctantly succumbed in editing the code. Now I see there is a bigger problem. Thanks again.

  • Abhinav

    Hi Daniel!

    I would like to confirm whether the following scenario is fine or not:

    If I am managing two different blogs, each having their respective folders: “root/blog1/” & “root/blog2” and I have 2 different domain names pointing to the respective blog folders. Will that be fine for search engines? There is nothing else in the root folder.

    Thanks!

  • Frances

    Hi there, has anyone successfully installed wordpress with discountasp.net as a /blog install?

  • Michael Aulia

    🙁
    If I only I read about this post a few months earlier.. I set up my WordPress’ blog to be under http://www.michaelaulia.com/blogs (I even put a mispelled ‘s’ on it!! doh)

    I don’t think I want to change it to the root, assuming there will be a lot of pains and tears

    Should I keep it under the /blogs ? The traffic is about 200 unique visits a day at the moment

  • reblogger

    I realize I’m a month late, but maybe someone will take the time to respond. I’m just learning about blogs and I had a question:

    We intend to have a blog with several features:

    blog entries with videos, rss feeds, opt-in form, and a few static pages (about us, information, etc). Primarily it will be a blog site, but over time there may be other features added on.

    I have a host who allows free add-on domains so this will be technically not on the primary domain, but for all intensive purposes it will (it has it’s own separate domain).

    so my question is, do I install WordPress on the root level, or on a sub folder or on a sub domain. And to make things more complicated, I’d prefer to keep the WP main files in a subfolder of the main root folder so that it’s not cluttering that folder.

    any suggestions?

  • Daniel Scocco

    reblogger, if you install WordPress on a subfolder, what will you put on the homepage?

  • howtoofeverything

    Thanks Daniel,

    I ‘ve been thinking for this situation for couple day and finally I find your web on google SERP that your tips get on page 1

    I had find a good resources to bookmark at your blogs.

    Nice for sharing

  • C.D. Allen

    What about if I want to install forum/message board software in the future? I wouldn’t be able to do so if I installed WP to the root directory, right?

  • Bryan Hee

    Good idea to install WP in the root directory, is easy for your visitor and search engine to find your blog. It’s more “search engine friendly”

    To Your Success
    Bryan Hee

  • Jennifer @ Quiverfull Family

    Hmm, well amen to that! I installed under /blog and am now having to move everything to the root. Seems like quite an undertaking, and hate to lose my links, but better late than never!

  • Ling

    I have just gotten a new domain – WinnersEducation.com
    Plan was to keep the homepage a homepage so I install my blog on http://www.WinnersEducation.com/blog
    (But I got an access error at WinnersEducation.com after uploading my index.html up)

    In fact, Tim Ferris has fourhourworkweek.com as his front page and his blog at fourhourworkweek.com/blog

    After reading this wonderful post, I’m considering if I should move wp to root directory (which I always do for my other blogs)

  • Veronica

    So I’m thinking of installing WordPress to my site, which will double as a Portfolio. My homepage, I’m planning on having a “featured works” section, as well as a section for recent blog posts (possibly just the title and a description of the post)

    Would this count as duplicate data? Or would I be safe?
    I’m not too sure about that …

  • Tim

    Where you put the WP files on your server and what url your visitors type in to access your site are two completely separate things.

    If you’ve installed WP to a subdirectory but want urls that make it look like it’s in root, instead of reinstalling to root you should follow the instructions at http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory.

  • Bang Kritikus

    How to install blogspot in root directory ??

  • SEO San Diego

    Like Ray Fowler above, I too have set up my blog in a sub-folder, but point it back to the root…I know this is done a lot, and many blogs appear to do just fine with it…BUT

    It doesn’t appear to me that an actual 301 directive is in place, so I actually wonder why we don’t get penalized by the search engines for doing a kind of “masked re-direct.”

    Any thoughts?

  • laurie Bixler

    You are all very much talking a bit techie and over my head. Could you be very specific with the instructions? Here is what I have:
    – blank sites registered with go-daddy that send over to my blog
    – a blog on blogger that is fairly new.
    I want to make sure I am doing this correctly.
    I use masking.
    I don’t use wordpress….plz tell me if I am making a mistake there too.
    thanks for the input and specifics.

  • Morgan Madej

    I am glad I found your blog with the interesting points about blog installs as I have been searching for the answer to “Where is the best place to install a WP blog-In the domain root or a sub directory/blog?”

    I have WP blogs in both root and /blog in the premise that if it is a new domain it goes into the root and if the domain has history and inbound back links then I put the blog into /blog with unique content and link to the original html pages from the content or from the Links sidebar.

    This was mindset until today when I installed a blog on an “aged” domain for the convenience of a quick install and setup while I revamped my html pages. (This was made easier as I had transferred 8 domains recently from my original web host here in Poland (No cPanel!) to a new host in the USA which has cPanel)

    The one advantage I can see is that installing a blog in /blog is if the domain is an existing commercial site that needs or wants to involve its visitors/customers on a blog with an opt-in that supports the main money site without disturbing their existing pages

    But now after reading all the comments here I am wondering if I am missing something too!

    I would really appreciate any comments on this approach…

  • Tai

    Am I missing something or does this not make any sense at all?
    If the same content is accessible from different addresses of your website then you need to set up a sitemap to identify which are your main pages. You could also set up a 301 wildcard redirect if it was a big problem.
    I am not convinced that you “should never” install a blog into a folder. Content can be accessed from different addresses regardless of whether it in a folder or not. It is not ideal and should be addressed on a case by case basis.

  • Elaine

    I want wordpress for my blog, but don’t want wordpress on all the other pages. How do you do this?

  • Troy Cornejo

    I made the same mistake, I originally made my site for something else but have since discovered having a blog is just the smart way to go so now everything goes through my blog.

    What I did was create a redirect that looks as if my Blog is loading it lasts a couple of seconds then loads my blog.

  • Saravana

    I have installed by blog on root directory, its a numerology blog, But now i am planning to enhance it with some additional features and a separate home page. How do i go about it? I cant change my blog url, as i ll lose my page rank. Can anyone help me

Comments are closed.