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
-
Huge increase in links to your site when moving to SSL
Hi My client has 2 websites that after moving them to SSL the number of links to your site in the search console increased in 10s of thousands. What can be the reasons?
Technical SEO | | digital19740 -
Help: Blog post translations resulting in 404 Not Found?
A client set up a website that has multilingual functionality (WPML) and the back end is a bit of a mess. The site has around 6 translated versions of the 30 or so existing English blog posts in French, Italian and Spanish - all with their own URLs. The problem is that on the remaining 24 English blog posts, the language changer in the header is still there - even though the majority of posts have not been translated - so when you go to change the language to French, it adds **?lang=fr **onto the existing english URL, and is a page not found (4xx client error). I can't redirect anything because the page does not exist. Is there a way to stop this from happening? I have noticed it's also creating italian/french/spanish translation of the english Categories too. Thanks in advance.
Technical SEO | | skehoe0 -
Off-site company blog linking to company site or blog incorporated into the company site?
Kind of a SEO newbie, so be gentle. I'm a beginner content strategist at a small design firm. Currently, I'm working with a client on a website redesign. Their current website is a single page dud with a page authority of 5. The client has a word press blog with a solid URL name, a domain authority of 100 and page authority of 30. My question is this: would it be better for my client from an SEO perspective to: Re-skin their existing blog and link to the new company website with it, hopefully passing on some of its "Google Juice,"or... Create a new blog on their new website (and maybe do a 301 redirect from the old blog)? Or are there better options that I'm not thinking of? Thanks for whatever help you can give a newbie. I just want to take good care of my client.
Technical SEO | | TheKatzMeow0 -
Creating a Blog of Rodent Removal Companies?
I am helping a small company. Lets say rodent removal is their service. But local SEO for rodent removal is very very competitive in my town and across America. Would a website/blog dedicated to highlighting rodent removers across America be good for my company? We have had nice success with wordpress.com blogs. Supposing I gave 6 other rodent removal companies a free guest post (always 300 words or more) or whatever to post on my blog. Of course, none of these companies would be in my market. Would that help my local SEO? I am thinking long term here?
Technical SEO | | greenhornet770 -
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 -
Best geotargeting strategy: Subdomains or subfolders or country specific domain
How have the relatively recent changes in how G perceives subdomains changed the best route to onsite geotargeting i.e. not building out new country specific sites on country specific and hosted domains and instead developing sub-domains or sub-folders and geo-targeting those via webmaster tools ? In other words, given the recent change in G perception, are sub-domains now a better option than a sub-folder or is there not much in it ? Also if client has a .co.uk and they want to geo-target say France, is the sub-domain/sub-folder route still an option or is the .co.uk still too UK specific, and these options would only work using a .com ? In other words can sites on country specific domains (.co.uk , .fr, .de etc etc) use sub-folders or domains to geo-target other countries or do they have no option other than to develop new country specific (domains/hosting/language) websites ? Any thoughts regarding current best practice in this regard much appreciated. I have seen last Febs WBF which covers geotargeting in depth but the way google perceives subdomains has changed since then Many Thanks Dan
Technical SEO | | Dan-Lawrence0 -
Blog Categories or Static Pages
Background: We're creating a site that for a service provider on a wordpress platform, and it will include a blog with a page for each service category. Let's say the client is a wedding photographer we'd create a page for studio portraits, events, wedding, newborns, family etc. Question: Should each category page be a stand-alone page or a blog category? As a blog category it will be updated with new content continually and automatically. However, it could cause duplicate content issues as well as keyword dilution. Research: I've done research and obviously there are conflicting opinions - skip categories altogether, categories bring traffic, problems & solutions. I'm hoping for your opinion on the matter, or direction to content on the issue that will be helpful. Blog categories yay or nay?
Technical SEO | | 5225Marketing0 -
Url re-write / minimal subfolders
<colgroup><col width="411"></colgroup>
Technical SEO | | Diana.varbanescu
| One of the most common warnings on our site www.sta.co.uk is the use of parameters in URL strings (they're crawled ok, it's mainly duplication content issues we're trying to avoid). The current traffic manager suggested ‘stage 1’ - remove the unwanted folder structure but wouldn’t tailor the dynamic url I'd say it is difficult to quantify what result this would have in isolation and I would rather do this update in tandem with the ‘stage 2’ which adds structure to the dynamic urls with multiple parameters.(Both stages will involve rewriting the page url and redirecting the long url to the short) Any thoughts, please? Is there any benefit in removing the subfolders (1) or should we wait and do it in one go? Thanks everyone, |0