Moz Q&A is closed.
After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.
How to move my blog from subdomain to subfolder?
-
Not an unusual situation, I have a blog on blog.domain.com it has quite a few blog postings. The platform is old and will be scrapped, but the blog content itself is going to be moved to domain.com/blog.
The current process is we are manually listing all linked to/content pages and we are going to 301 redirect them to their counterparts on the new blog. This is going to be a tedious process.
A) Is there any way to automate the moving of the blog?
B) What is the best way to do the massive 301 redirect, php headers, .htaccess? Should we move the individual pages with redirects, or redirect the domain in the .htaccess (this will be very difficult to match all the titles and file structure)?
-
Hi Keri.
You're right! I am not a professional in the matter and I am trying to catch up little by little.
Thanks for your advice!
-
This thread is actually four years old, and the original poster mentioned that the problem was solved so no worries! You might want to look at more recent questions, as SEO advice can change as the search engines change.
-
We solved it, our web programmer wrote a program to scrape all of our posts and turn them into a format that imported into wordpress. As far as the redirects we kept the page titles the same and did a sitewide 301 that sent them from blog.example.com to example.com/blog/
Although I would still like to grab Richard's php script for doing this in a more efficient manner in the future.
-
It will if you add r=301 to the last line like so:
RewriteRule ^(.*)$ /blog/$1 [L,R=301]
-
Spencer, did you get this taken care of off-line, or is this question still open?
[Keri Morgret, SEOmoz Associate]
-
Would you mind posting or messaging me the correct script? It would be a great help, thanks.
-
Yup, that will do the job of relocation, but it does not 301 the link and therefore you will not transfer link juice.
-
Found this one:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^blog.mysite.com
RewriteRule ^(.*)$ /blog/$1 [L] -
I am mobile, so excuse the typos Using PHP, grab the incoming title and do a 301 header redirect to the new location. No need to mass 301 in .htaccess. If you need the script, let me know
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Is having my homepage on a subfolder harmful?
Hi guys, I am the webmaster of the following two websites: www.gpblog.com/nl
Technical SEO | | NielsDE
www.gpblog.com/en The first URL is the Dutch version of GPBlog, the second URL is the UK version of GPblog. Whenever a person visits www.gpblog.com he gets redirected to either the Dutch version or the UK version based on his location. My question is: is it harmful to have 1. your homepage on a subfolder and 2. is it harmful to run two different languages on one domain using this technique? Thank you in advance!1 -
Impact of Medium blog hosted on my subdomain
I am using the Medium blogging platform to blog, but it is pointed to my site and appears at blog.mysite.com. Since the content is hosted on Medium and pointed to my subdomain via an A Record / CNAME / etc... 1. Will my domain get credit for backlinks to the blog content? 2. If Medium changes in the future and no longer points to my subdomain, will I lose all of the backlinks I've built up?
Technical SEO | | davidevans_seo0 -
Moving from a subdomain to subfolder
Hello, I am currently working on a site that is leveraging multiple subdomains. I wanted to see if it suggested to migrate them into subfolders. One of the subdomains is a .shop and the other is location specific. Thanks, T
Technical SEO | | Tucker_100 -
Referencing links in Articles and Blogs
Hi I am wondering if the <sup>tag in html is picked up by google as a reference point?</sup> I.e when you put a superscript in word it puts a small number next to your sentence. Then you have a list of reference at the end of the blog/article does google recognise this?
Technical SEO | | Cocoonfxmedia0 -
Why is my blog disappearing from Google index?
My Google blogger blog is about 10 months old. In that time i have worked really hard with adding unique content, building relationships with other bloggers in the same niche, and done some inbound marketing. 2 weeks ago I updated the template to something cleaner, with a little more "wordpress" feel to it. This means i've messed about with the code a lot in these weeks, adding social buttons etc. The problem is that from some point late last week thurs/fri my pages started disappearing from Googles index. I have checked webmaster tools and have no manual actions. My link profile is pretty clean as its a new site, and i have manually checked every piece of content published for plagiarism etc. So what is going on? Did i break my blog? Or is something else amiss? Impressions are down 96% comparing Nov 1-5th to previous 5 days. site is here: http://bit.ly/174beVm Thanks for any help in advance.
Technical SEO | | Silkstream0 -
Speed benefits from loading images from a subdomain
I have read that loading images from a subdomain of your site instead of the main domain will give you speed benefits on load time. Has anyone actually seen that to be the case? Thanks!
Technical SEO | | Gordian0 -
Keep the blog separate or incorporate into main domain?
So my organization currently has both a main site and on a separate domain and separate host a wordpress blog. (our own domain not a wordpress.com) the content posted on this blog is local, community driven, and related to our business but it is not used in anyway as a "sales" tool. It's more for interaction purposes with members and employees. This blog has a lot of content and is updated with new posts very often. (generate traffic from a pretty wide variety of searches some related some not) My plan has been to 301 the old domain and move the wordpress blog over to our root domain in a subdirectory such as oursite.com/blog. Does anyone have tips for moving a blog over like this? I'm concerned about any link juice it has dropping off and since it does provide some links to our root site currently (since it's basically a separate site). Basically i'm wondering if it'll be worth the effort or if i should just keep it separate and focus on other content gen strategies.
Technical SEO | | SCFederal0 -
Redirecting blog.<mydomain>.com to www.<mydomain>.com\blog</mydomain></mydomain>
This is more of a technical question than pure SEO per se, but I am guessing that some folks here may have covered this and so I would appreciate any questions. I am moving from a WordPress.com-based blog (hosted on WordPress) to a WordPress installation on my own server (as suggested by folks in another thread here). As part of this I want to move from the format blog.<mydomain>.com to www.mydomain.com\blog. I have installed WordPress on my server and have imported posts from the hosted site to my own server. How should I manage the transition from first format to the second? I have a bunch of links on Facebook, etc that refer to URLs of the blog..com format so it's important that I redirect.</mydomain> I am running DotNetNuke/WordPress on my own IIS/ASP.Net servers. Thanks. Mark
Technical SEO | | MarkWill0