• majorAlexa

        See all notifications

        Skip to content
        Moz logo Menu open Menu close
        • Products
          • Moz Pro
          • Moz Pro Home
          • Moz Local
          • Moz Local Home
          • STAT
          • Moz API
          • Moz API Home
          • Compare SEO Products
          • Moz Data
        • Free SEO Tools
          • Domain Analysis
          • Keyword Explorer
          • Link Explorer
          • Competitive Research
          • MozBar
          • More Free SEO Tools
        • Learn SEO
          • Beginner's Guide to SEO
          • SEO Learning Center
          • Moz Academy
          • MozCon
          • Webinars, Whitepapers, & Guides
        • Blog
        • Why Moz
          • Digital Marketers
          • Agency Solutions
          • Enterprise Solutions
          • Small Business Solutions
          • The Moz Story
          • New Releases
        • Log in
        • Log out
        • Products
          • Moz Pro

            Your all-in-one suite of SEO essentials.

          • Moz Local

            Raise your local SEO visibility with complete local SEO management.

          • STAT

            SERP tracking and analytics for enterprise SEO experts.

          • Moz API

            Power your SEO with our index of over 44 trillion links.

          • Compare SEO Products

            See which Moz SEO solution best meets your business needs.

          • Moz Data

            Power your SEO strategy & AI models with custom data solutions.

          Let your business shine with Listings AI
          Moz Local

          Let your business shine with Listings AI

          Learn more
        • Free SEO Tools
          • Domain Analysis

            Get top competitive SEO metrics like DA, top pages and more.

          • Keyword Explorer

            Find traffic-driving keywords with our 1.25 billion+ keyword index.

          • Link Explorer

            Explore over 40 trillion links for powerful backlink data.

          • Competitive Research

            Uncover valuable insights on your organic search competitors.

          • MozBar

            See top SEO metrics for free as you browse the web.

          • More Free SEO Tools

            Explore all the free SEO tools Moz has to offer.

          NEW Keyword Suggestions by Topic
          Moz Pro

          NEW Keyword Suggestions by Topic

          Learn more
        • Learn SEO
          • Beginner's Guide to SEO

            The #1 most popular introduction to SEO, trusted by millions.

          • SEO Learning Center

            Broaden your knowledge with SEO resources for all skill levels.

          • On-Demand Webinars

            Learn modern SEO best practices from industry experts.

          • How-To Guides

            Step-by-step guides to search success from the authority on SEO.

          • Moz Academy

            Upskill and get certified with on-demand courses & certifications.

          • MozCon

            Save on Early Bird tickets and join us in London or New York City

          Unlock flexible pricing & new endpoints
          Moz API

          Unlock flexible pricing & new endpoints

          Find your plan
        • Blog
        • Why Moz
          • Digital Marketers

            Simplify SEO tasks to save time and grow your traffic.

          • Small Business Solutions

            Uncover insights to make smarter marketing decisions in less time.

          • Agency Solutions

            Earn & keep valuable clients with unparalleled data & insights.

          • Enterprise Solutions

            Gain a competitive edge in the ever-changing world of search.

          • The Moz Story

            Moz was the first & remains the most trusted SEO company.

          • New Releases

            Get the scoop on the latest and greatest from Moz.

          Surface actionable competitive intel
          New Feature

          Surface actionable competitive intel

          Learn More
        • Log in
          • Moz Pro
          • Moz Local
          • Moz Local Dashboard
          • Moz API
          • Moz API Dashboard
          • Moz Academy
        • Avatar
          • Moz Home
          • Notifications
          • Account & Billing
          • Manage Users
          • Community Profile
          • My Q&A
          • My Videos
          • Log Out

        The Moz Q&A Forum

        • Forum
        • Questions
        • My Q&A
        • Users
        • Ask the Community

        Welcome to the Q&A Forum

        Browse the forum for helpful insights and fresh discussions about all things SEO.

        1. Home
        2. SEO Tactics
        3. Technical SEO
        4. How to move my blog from subdomain to subfolder?

        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?

        Technical SEO
        7
        10
        7820
        Loading More Posts
        • Watching

          Notify me of new replies.
          Show question in unread.

        • Not Watching

          Do not notify me of new replies.
          Show question in unread if category is not ignored.

        • Ignoring

          Do not notify me of new replies.
          Do not show question in unread.

        • Oldest to Newest
        • Newest to Oldest
        • Most Votes
        Reply
        • Reply as question
        Locked
        This topic has been deleted. Only users with question management privileges can see it.
        • MarloSchneider
          MarloSchneider last edited by

          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)?

          1 Reply Last reply Reply Quote 0
          • jaraca
            jaraca last edited by

            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!

            1 Reply Last reply Reply Quote 0
            • KeriMorgret
              KeriMorgret last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • MarloSchneider
                MarloSchneider @MarloSchneider last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • A_Q
                  A_Q @Getz.pro last edited by

                  It will if you add r=301 to the last line like so:

                  RewriteRule ^(.*)$ /blog/$1 [L,R=301]

                  1 Reply Last reply Reply Quote 0
                  • KeriMorgret
                    KeriMorgret @MarloSchneider last edited by

                    Spencer, did you get this taken care of off-line, or is this question still open?

                    [Keri Morgret, SEOmoz Associate]

                    1 Reply Last reply Reply Quote 0
                    • MarloSchneider
                      MarloSchneider @Getz.pro last edited by

                      Would you mind posting or messaging me the correct script?  It would be a great help, thanks.

                      KeriMorgret MarloSchneider 2 Replies Last reply Reply Quote 0
                      • Getz.pro
                        Getz.pro @Dan-Petrovic last edited by

                        Yup, that will do the job of relocation, but it does not 301 the link and therefore you will not transfer link juice.

                        A_Q 1 Reply Last reply Reply Quote 1
                        • Dan-Petrovic
                          Dan-Petrovic last edited by

                          Found this one:

                          RewriteEngine On
                          RewriteCond %{HTTP_HOST} ^blog.mysite.com
                          RewriteRule ^(.*)$ /blog/$1 [L]

                          Source: http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/

                          Getz.pro 1 Reply Last reply Reply Quote 0
                          • Getz.pro
                            Getz.pro last edited by

                            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

                            MarloSchneider 1 Reply Last reply Reply Quote 0
                            • 1 / 1
                            • First post
                              Last post

                            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.

                            • See all categories

                            Related Questions

                            • SEOCT

                              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 | | SEOCT
                              1
                            • Happy-SEO

                              Images, CSS and Javascript on subdomain or external website

                              Hi guy's, I came across webshops that put images, CSS and Javascript on different websites or subdomains. Does this boost SEO results? On our Wordpress webshop all the sourcescodes are placed after our own domainname: www.ourdomainname.com/wp-includes/js/jquery/jquery.js?ver=1.11.3'
                              www.ourdomainname.com/wp-content/uploads/2015/09/example.jpg Examples of other website: Website 1:
                              https://www.zalando.nl/heren-home/ Sourcecode:
                              https://secure-i3.ztat.net//camp/03/d5/1a0168ac81f2ffb010803d108221.jpg
                              https://secure-media.ztat.net/media/cms/adproduct/ad-product.min.css?_=1447764579000 Website 2:
                              https://www.bol.com/nl/index.html Sourcecode:
                              https://s.s-bol.com/nl/static/css/main/webselfservice.1358897755.css
                              //s.s-bol.com/nl/upload/images/logos/bol-logo-500500.jpg Website 3: 
                              http://www.wehkamp.nl/ Sourcecode:
                              https://static.wehkamp.nl/assets/styles/themes/wehkamp.color.min.css?v=f47bf1
                              http://assets.wehkamp.com/i/wehkamp/350-450-layer-SDD-wk51-v3.jpg

                              Technical SEO | | Happy-SEO
                              0
                            • m.m

                              Subdomain as News Section instead of Source in Google News?

                              Hi, trying to dig into Google News for a large site, mostly containing news.
                              The structure of the site network is subdomain.domain.se, and each subdomain has it's own brand with it's own news: x.domain.se
                              y.domain.se
                              z.domain.se
                              etc... Each brand/subdomain is more or less to equate with its own subjectfield/section. In Google News every subdomain is configured with it's own Site Source url, but also having the set up with one section with the same url. It seems like they're getting conflicts in Google News, Google can't always figure out which news article to which brand. Example: an article owned by brand A, but it is sometimes happens that articles getting labeled as brand B in the news SERP, though the link takes you correctly to brand A. I am thinking that this config in News Publisher Center may be a problem? Anyone having any thoughts if that would be better if we delete all source urls except for domain.se-brand and then put all the other subdomains as sections? www.domain.se x.domain.se y.doamin.se z.domain.se Any smart thoughts on this one? Or anything else that could make this wrong labeling (all content included images are hosted in same domain for example). Regards,
                              Magnus

                              Technical SEO | | m.m
                              0
                            • bedbugsupply

                              Reverse proxy a successful blog from subdomain to subfolder?

                              I have an ecommerce site that we'll call confusedseo.com. I created a WordPress blog and CNAME'd it to blog.confusedseo.com. Since then, the blog has earned a PageRank of 3 and a decent amount of organic traffic. I am considering a reverse proxy to forward blog.confusedseo.com to confusedseo.com/blog/. As I understand it, this will greatly help the "link juice" of the root domain. However, I'm concerned about any potential harm done to the existing SEO value of the blog. What, if anything, should I be doing to ensure that the reverse proxy doesn't hurt my "juice" rather than help it?

                              Technical SEO | | bedbugsupply
                              0
                            • onurkiyak

                              Blog article URL - with or without date?

                              Quick question to all you folks: does including the date in a blog article's permalink affect rankings? For example, here's an article with the month and year, as well as the blog title: http://www.ayzanyc.com/blog/2012/12/difference-between-hot-chocolate-hot-cocoa/ Is it better to omit the date and just put the blog title? Also, if is better to avoid using the date, is it worth it to change the link structure of our previous articles (given that the URL will now be different), or should we just focus on future articles? Thanks ahead of time for your advice.

                              Technical SEO | | onurkiyak
                              0
                            • PeterM22

                              Blog post summary pages

                              I'm wondering post-panda if its wise to block access to blog post summary pages like this one: http://www.howtotradestocks.org/blog/page/15/ Any thoughts?

                              Technical SEO | | PeterM22
                              0
                            • bThere

                              Subdomain and Domain Rankings

                              I have read here that domain names with keywords might add a boost to your search rank For instance using a completely inane example monkey-fights.com might get a boost compared to mfl.com (monkey fighting league)  when searching for "monkey fights" There seems to be a hot debate as to how much bonus the first domain might get over the second, but leaving that aside for the moment. Question 1. Would monkey-fights.mfl.com get the same kind of bonus as a root domain bonus? Question 2. If the answer to 1 above was yes would a 301 redirect from the suddomain URL to root domain URL retain that bonus I was just thinking on how hard it is to get root domains these days that are not either being squatted on etc. and if this might be a way to get the same bonus, or maybe subdomains are less bonus prone and so it would be a waste of time Thanks

                              Technical SEO | | bThere
                              0
                            • MarkWill

                              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 | | MarkWill
                              0

                            Get started with Moz Pro!

                            Unlock the power of advanced SEO tools and data-driven insights.

                            Start my free trial
                            Products
                            • Moz Pro
                            • Moz Local
                            • Moz API
                            • Moz Data
                            • STAT
                            • Product Updates
                            Moz Solutions
                            • SMB Solutions
                            • Agency Solutions
                            • Enterprise Solutions
                            • Digital Marketers
                            Free SEO Tools
                            • Domain Authority Checker
                            • Link Explorer
                            • Keyword Explorer
                            • Competitive Research
                            • Brand Authority Checker
                            • Local Citation Checker
                            • MozBar Extension
                            • MozCast
                            Resources
                            • Blog
                            • SEO Learning Center
                            • Help Hub
                            • Beginner's Guide to SEO
                            • How-to Guides
                            • Moz Academy
                            • API Docs
                            About Moz
                            • About
                            • Team
                            • Careers
                            • Contact
                            Why Moz
                            • Case Studies
                            • Testimonials
                            Get Involved
                            • Become an Affiliate
                            • MozCon
                            • Webinars
                            • Practical Marketer Series
                            • MozPod
                            Connect with us

                            Contact the Help team

                            Join our newsletter
                            Moz logo
                            © 2021 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                            • Accessibility
                            • Terms of Use
                            • Privacy

                            Looks like your connection to Moz was lost, please wait while we try to reconnect.