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
-
Question on Pagination - /blog/ vs /blog/?page=1
Question on Pagination Because we could have /blog/ or /blog/?page=1 as page one would this be the correct way to markup the difference between these two URL? The first page of a sequence could start with either one of these URLs. Clarity around what to do on this first page would be helpful. Example… Would this be the correct way to do this as these two URLs would have the exact content? Internal links would likely link to /blog/ so signal could be muddy. URL: https://www.somedomain.com/blog/
Technical SEO | | jorgensoncompanies
<link rel="canonical" href="https://www.somedomain.com/blog/?page=1"> URL: https://www.somedomain.com/blog/?page=1
<link rel="canonical" href="https://www.somedomain.com/blog/?page=1"> Google is now saying to just use the canonical to the correct paginated URL with page number. You can read that here:
https://developers.google.com/search/docs/advanced/ecommerce/pagination-and-incremental-page-loading But they do not clarify what to do on /blog/?page=1 vs /blog/ as they are the exact same thing. Thanks for your help.0 -
Moving E-Commerce Store to Subdomain?
Hi all, We have a customer who currently uses Square for their in-store point-of-sale system as well as for their e-commerce website. From my understanding, a Square site is a watered-down version of Weebly, and is proving to be highly restrictive from an SEO and content structuring standpoint. It's been an uphill battle to try and get traction for their site in SERPs. Would it be a bad idea to move the entire Square online store to a subdomain, and install WordPress on the root domain? This way their online store would remain as-is, but the primary pages on the site would be on WordPress which would give us a lot more control over the content. I just want to make sure this doesn't negatively impact their SEO. Thanks!
Technical SEO | | suarezventures0 -
Hi! I first wrote an article on my medium blog but am now launching my site. a) how can I get a canonical tag on medium without importing and b) any issue with claiming blog is original when medium was posted first?
Hi! As above, I wrote this article on my medium blog but am now launching my site, UnderstandingJiuJitsu.com. I have the post saved as a draft because I don't want to get pinged by google. a) how can I get a canonical tag on medium without importing and b) any issue with claiming the UJJ.com post is original when medium was posted first? Thanks and health, Elliott
Technical SEO | | OpenMat0 -
I want to transfer an old Blogger blog onto my new site
When we first started out our website didn't have a blog and we started one on Blogger. It has loads of great content on it but it was before the days when I understood SEO so it's 4 years old and has maybe 1000 views per blog article. Now I want to repurpose some of that great content and SEO optimise it and put it onto my new site. How do I go about this from an SEO perspective. I am aware of internal competition and will only be using the old blogs that are new topics to start off with so it doesn't negatively impact my rankings. Should I just delete the old blog and re-write it all on the new one or redirect the old blog articles to the new pages and rewrite them? The blogger articles have no links to them and it's just content that I'd like to use. The old blog has almost no SEO value at all but I want to use a best practice approach to not cause any damage to my new blog or have google thinking I'm stealing someone else's content.
Technical SEO | | Smileworks_Liverpool0 -
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 -
Moving to https
Hi all and thanks for taking the time to read my question. We are going to migrate a very small website from http to https, its a roughly 9 page site with 5 of those being product pages. I figured I would have to set a canonical and permanent 301 redirects for each page. But our tech guys suggested just doing a binding to https so any traffic hitting our site with a http url would automatically get redirected to the https version. So if someone land on http://mydomain, it would automatically return https://mydomain Does this sound correct or would we need to do additional tasks even if we go down the binding route?thanks again for looking.
Technical SEO | | Renford_Nelson1 -
Moved to a New Server IP Address
Hi, I just upgraded everything, a much faster server. I have significantly improved page load times. I have 2 questions 1. I also upgraded my blog which is a component of the site. I could NOT redirect post-for-post so made single 301 redirect from all pages from the old blog to the root of new blog. I did not care about the old blog, the posts are irrelevant now. Will the massive redirects be a problem? 2. I had some DNS issues and other problems that took me about 24 hours to fix during the transition. The site is up an fully operational. Will I be penalized? If so, how long Thank you,
Technical SEO | | Bucky0 -
Subfolder to Root Domain, Should i or not?
Dear All, I am kinda of stuck and need your helps, I have major client's site which is located in subdirectory. Instance: http://www.majorclient.com.cn/cn/ and as you can see domain name is already localized and they are not planning to make any english version of the site, So there will be no /eng/ folder but clients whole website is /cn/ subdirectory which is totally unnecessary and i would like to 301 whole site to **http://www.majorclient.com.cn ** But the problem is that this site has been /cn/ folder forever since the beginning and lot of trusted links are pointing to www.majorclient.com.cn/cn/ So should i move it or just configure 301 www.majorclient.com.cn to www.majorclient.com.cn/cn/ leave it there and don't bother. Help?
Technical SEO | | DigitalJungle0