I'm trying to figure out how to get a tumblr blog to run under a subdirecory (not subdomain) and I'm kind of stuck. I was thinking of changing the cname of my domain to tumblr blog but that would change the entire domain, correct?

Would it be done somewhere in the .htacess?

I've seen it in action here http://www.senanyc.com/blog/ but I have no idea how they did it .

2 Answers 2


I haven't tried it myself, but this guy offers a solution: http://web.archive.org/web/20070702115331/http://henrik.nyh.se/2007/06/tumblr-in-a-subdirectory. You need access to to your htaccess file and you need to be able to save a php script. It looks fairly straightforward.

You can draw further inspiration (at least for the redirecting part) from this guide on how to install Wordpress in a subdirectory: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

And finally, on SO the question has been asked, it is basically the same method (changing your htaccess file: https://stackoverflow.com/questions/10034152/htaccess-how-to-redirect-subdirectory-to-external-url

As for SEO benefits of using a sub-directory, this guy here states that using a sub-directory is best from an SEO standpoint. http://www.agent-seo.com/blogging/seo-subdomain-vs-subdirectory/. This one here seems to agree: http://www.timpeter.com/blog/2011/12/14/subdomains-vs-subdirectories-and-seo/.

I don't know how that applies to your situation where the blog is hosted on a different IP address - Tumblr is elsewhere, after all. I don't think there is a big impact though - I have found no evidence to support it. I would only ask myself that question if you are trying to rank for highly competitive keywords. But then you would be probably better closing your Tumblr blog and moving the posts to a subdirectory on your site. But again, this is only important if you are competing with lots of other sites where every bit of SEO benefit counts.

  • thanks ill check that out. As with the wordpress in a subdirectory its not the same as with wordpress your installing it onto a subdirectory and hosting it. With tumblr your trying to mask / mirror the tumblr blog onto the sub directory.
    – sam
    Commented Jun 11, 2012 at 12:18
  • @sam yes there is a difference, but you still need to redirect. This is the same AFAICS. Instead of redirecting to a subdirectory like for WP, in the Tumblr case, you redirect to another domain. Commented Jun 11, 2012 at 12:46
  • do you know if redirecting in the tumblr method as above is seo friendly ? thanks for all the imput
    – sam
    Commented Jun 11, 2012 at 12:56
  • @sam not for sure, but if you link to example.com/mytumblrlog it should benefit your seo for the site as a whole. I am not sure if search engines will crawl it correctly if they don't have backlinks. Commented Jun 11, 2012 at 14:03
  • @sam just substantially edited my answer and included SEO considerations. Oh, and do upvote my answer. I have invested some time in it, thx. Commented Jun 11, 2012 at 14:16

I'm running an app on Heroku and I'm having trouble coming up with a similar solution that you gave for http://www.senanyc.com/blog/. What's amazing is that if you go to http://senanyc.tumblr.com (which I guessed was their tumblr subdomain) it links back to http://www.senanyc.com/blog/. They're doing this with some javascript

if (location.host == 'senanyc.tumblr.com')
    location.replace(location.href.replace('senanyc.tumblr.com', 'www.senanyc.com/blog'));

All the tumblr post urls are short tumblr.co urls that eventually point to senanyc.tumblr.com as shown here: http://longurl.org/expand?url=http%3A%2F%2Ftmblr.co%2FZQDX0yQP2NQm

My guess is that they're using a reverse proxy to serve up the tumblr blog through http://www.senanyc.com/blog/ After that, they use JS to replace the tumblr subdomain with their subdirectory. Since none of the URLs resolve to the subdirectory, this severely limits their SEO capability.

So far I've been able to use a reverse-proxy (implementation of that depends on your stack) to have my server serve up my tumblr's content to a user. The problem with that is the links in the tumblr blog are all absolute using the tumblr subdomain (myblog.tumblr.com). In the process of serving up the page in the reverse-proxy I could replace all (myblog.tumblr.com) with (www.mysite.com/blog) and that should work.

I want to be able to have my blog SEOable under my subdirectory. I've yet to figure that out...

  • thats exactly the problem i was having ! i got it to work running on /blog but all the links where still pointing to the tumblr subdomain, what i was trying to do was setup 301 redirects from the tumblr subdomain to /blog. But i couldnt work out how to add 301's to tumblr. If you find a solution id be realy interested to know ..
    – sam
    Commented Jul 30, 2012 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.