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
-
Duplicate Page Titles For Paginated Topics In Blog
Hello, I've just run a site audit and it has come up with a duplicate title tag issue for the topics section of our blog. For example it is flagging that the following have the same page title. https://blog.companyname.com/topic/topic-name https://blog.companyname.com/topic/topic-name/page/2 How significant is this as an SEO issue and what are the ways we can go about fixing this? I look forward to any suggestions and guidance that can be provided. Thanks, John
Technical SEO | | SEOCT1 -
Moving to TLS and disavow file
I'm considering the move to TLS/SSL obviously will be setting up the version in Search Console, do I need to re-upload the disavowal file previously generated before the move? Look forward to your response.
Technical SEO | | seoman100 -
Subdomains or Subdirectory for multisite SEO structure?
Hey Mozzers, I work for a startup releasing several apps all within their own niches: hiking, mountain biking, skiing, running etc.. We've decided to go for the Wordpress Multisite route and I was wondering what the best site structure was. For example: Would hike.myapp.com or myapp.com/hike be more beneficial to our growth plans? My thinking follows that of geotargeting strategies for franchises (uk.travel.com etc) and to go for the subdomain option in order to build each individual 'sites' authority because each sport has niche audiences. Or am I talking nonsense? I've read varying advice and thought I'd ask you guys. Cheers, A
Technical SEO | | AdamRob011 -
Updating old blog posts in Wordpress to appear more recent?
I'm doing work for a law firm that has a lot of blog post content from 2010-2011 ranking for long-term keywords. These pages are displaying date snippets in SERPs, but because legal information can change year to year, I don't want the content to appear as though it's 2-3 years old. The date of the post is in the URL structure, so I can't change the publication date w/o changing the URL. So my question is twofold: is there a way to show an updated date snippet in search results, or block the date snippet from showing, even if the date is in the URL? Or are there other options - creating pages for each of these posts and 301ing them to the page that has a cleaner URL, etc.? Thanks in advance for your help!
Technical SEO | | dchristensen30 -
To integrate a blog tool onto site - or build a blog solution - what's better for SEO?
Currently looking at adding a blog to our company site subdirectory and wanted to know if there was a SEO distinction between the following methods: Integrating a bolt-on blog tool with the site to create the blog VS. just using the current site infrastructure to build blog functionality. What's better for SEO? (and if tool integration is the overwhelming response - which tool?). Cheers.
Technical SEO | | Oxfordcomma0 -
Moving content from CMS pages to a blog - 301 or rel canonical?
Our site has some useful information buried in out-of-the-way CMS pages, and I feel like this content is more suited to our blog. What's my best method here? 1. Move the content to a blog post, delete the original page, and 301. 2. Move the content to a blog post, leave the original page up, and rel canonical. 3. Rewrite the content so it's not a duplicate, keep original page up, and post rewritten content on the blog. 4. Something else. Some of this content has inbound links and some does not. Quite a bit of it gets long-tail traffic already. It just looks kludgy because it's on pages that really aren't designed for articles. It would look much nicer and be much more readable/shareable/linkable on the blog.
Technical SEO | | CMC-SD0 -
Rankings of Subdomains vs. Main Domain
Here's a puzzler... Our main domain (www.ides.com) doesn't appear in Google (but does on Bing and other engines). We think this is due to duplicate content which we're fixing. However our website's subdomains continue to appear prominently in SERPs, even on Google - here are some examples: IDES Prospector = prospector.ides.com IDES = support.ides.com Cycolac FR15 = catalog.ides.com Why would Google penalize a main domain and its subdomains?
Technical SEO | | Prospector-Plastics0 -
Htaccess help... I moved my blog from a seperate domain to newdomain.com/blog
Hi, I need help with my htaccess file, I've been told. I moved a blog i had hosted somewhere else to a directory on my ecommerce site. I was told i would need to write something to go in the htaccess file so the sites would not become duplicate content, but I'm a novice and have no idea how to write that code. blog moved from www.whosyourmoondoggie.com to www.moondoggieinc.com/blog Please help, or direct me to the right tutorial 🙂 Thanks! KristyO
Technical SEO | | KristyO0