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
-
Blogs Not Getting Indexed Intermittently - Why?
Over the past 5 months many of our clients are having indexing issues for their blog posts.
Technical SEO | | JohnBracamontes
A blog from 5 months ago could be indexed, and a blog from 1 month ago could be indexed but blogs from 4, 3 and 2 months ago aren't indexed. It isn't consistent and there is not commonality across all of these clients that would point to why this is happening. We've checked sitemap, robots, canonical issues, internal linking, combed through Search Console, run Moz reports, run SEM Rush reports (sorry Moz), but can't find anything. We are now manually submitting URLs to be indexed to try and ensure they get into the index. Search console reports for many of the URLs will show that the blog has been fetched and crawled, but not indexed (with no errors). In some cases we find that the blog paginated pages (i.e. blog/page/2 , blog/page/3 , etc.) are getting indexed but not the blogs themselves. There aren't any nofollow tags on the links going to the blogs either. Any ideas? *I've added a screenshot of one of the URL inspection reports from Search Console alt text0 -
How to optimize Wordpress.org hosted blogs
I've got a blog I'm working on that isn't self-hosted. I've attached a screenshot of the message I get if I try to install any plugins. I really want to block archive, author, tag, category, etc pages but I can't seem to find a way since there's no server for me to block via robots.txt or .htaccess and I can't actually install these plugins which would give me the ability to do it. Any suggestions? vQfnt
Technical SEO | | ShawnW0 -
Removing site subdomains from Google search
Hi everyone, I hope you are having a good week? My website has several subdomains that I had shut down some time back and pages on these subdomains are still appearing in the Google search result pages. I want all the URLs from these subdomains to stop appearing in the Google search result pages and I was hoping to see if anyone can help me with this. The subdomains are no longer under my control as I don't have web hosting for these sites (so these subdomain sites just show a default hosting server page). Because of this, I cannot verify these in search console and submit a url/site removal request to Google. In total, there are about 70 pages from these subdomains showing up in Google at the moment and I'm concerned in case these pages have any negative impacts on my SEO. Thanks for taking the time to read my post.
Technical SEO | | QuantumWeb620 -
How to add specific Tumblr blogs into a disavow file?
Hi guys, I am about to send a reconsideration letter and still finalizing my disavow file. The format of the disavow is Domain:badlink.com (stripping out to the root domain) but what about those toxic links that are located in tumblr such as: badlink.tumblr.com? The issue is that there are good tumblr links we got so I don't want to add just tumblr.com so do you guys think I will have issues submitting badlink.tumblr.com and not tumblr.com? Thank you!
Technical SEO | | Ideas-Money-Art0 -
Irrelevant Subfolders?
I have my root domain and as I am a web designer, I use subfolders as sandboxes for client websites. I would not like these to be searched though because they are just demos, ideas and such. Would this be a robots.txt matter or can I have SEOMoz wok with a campaign where I can exclude subfolders? Thank you in advance! : )
Technical SEO | | Blobe0 -
How to block google robots from a subdomain
I have a subdomain that lets me preview the changes I put on my site. The live site URL is www.site.com, working preview version is www.site.edit.com The contents on both are almost identical I want to block the preview version (www.site.edit.com) from Google Robots, so that they don't penalize me for duplicated content. Is it the right way to do it: User-Agent: * Disallow: .edit.com/*
Technical SEO | | Alexey_mindvalley0 -
What are the SEO related negative aspects of having a blog on a subdomain?
Just double checking this one. Is it less than ideal to have a blog on a subdomain rather than as a sub folder on a domain?
Technical SEO | | PerchDigital0 -
What are the pros and cons of moving one site onto a subdomain of another site?
Two sites. One has weaker sales. What would the benefits and problems for SEO of moving the weak site from its own domain to a subdomain of the stronger site?
Technical SEO | | GriffinHansen0