<p>David,</p>

<p>I like using <a href="https://github.com/davist11/craft-reroute" rel="nofollow">Reroute</a>. It's a Craft plugin that lets you create 301s and 302s to any of your entry pages within Craft. </p>

CC BY-SA 3.0
2016-04-24T08:59:28.283Z
Yeah I used it too but it's more für stuff where I know it comes a 404. But maybe I've a simple but perfect solution with Google Analytics. I track the 404 and generate a redirect with Reroute. Cool was to have it all in one place.
davidhellmann
CC BY-SA 3.0
2016-04-24T13:25:28.350Z
Oh I see what you mean. I personally quite found the plugin that will do both, though it surprises me. There is a commercial plugin I've used once called 404 Finder but if you're comfortable getting the same details from GA then it's not going to improve that workflow.
Tim Knight
CC BY-SA 3.0
2016-04-24T14:13:00.320Z
@khalwat worked on a plugin like this on. Sounds interesting:

khalwat [1:01 AM] 
There are a few good redirect plugins out there; I’m working on one that adds a nice layer that allows you to redirect from URL patterns that key off of imported data
davidhellmann
CC BY-SA 3.0
2016-04-24T04:08:46.400Z
2016-04-24T04:08:46.400Z
Tim Knight
<p>Why are your blog posts' URLs different after you migrated in the first place? Different slugs, URL format, etc? What you did before is going inform what you can do now.  And how did you do the migration? </p>

<p>I see 2 problems here:</p>

<ol>
<li>404s</li>
<li>Keeping link juice</li>
</ol>

<p>If you can solve #1, #2 can take care of itself.</p>

<p>I'd try to get your URLs into same format as what you had for WP and mimic the format. If you can't or won't do that, at least get the post's <code>slug</code> the same as what you had before, then you at least having a fighting chance to try and rewrite what you had into your newer post format.</p>

<p>For example, if you changed <code>/blog/post</code> into <code>news/post</code> or whatever, you might have rewrite rule that looks like:</p>

<pre><code>    RewriteEngine On
    RewriteRule ^blog/(.*)$ /news/$1 [R=301,NC,L]
</code></pre>

<p>That'll take care of the format problem but I'm guessing it goes deeper than that. </p>

<p>How did you import your old content? If your post slugs changed, export the old content from WP into a CSV. You likely just need to export the post title and its slug. </p>

<p>Then use Bob Olde Hampsink's handy <a href="https://github.com/boboldehampsink/import" rel="nofollow noreferrer">Import</a> plugin to change your post slugs back to what they were before. Just pick your section(s), re-import the title and slug, and leave the rest of the fields untouched.</p>

<p>You might also use something like Moz's <a href="https://moz.com/researchtools/ose/" rel="nofollow noreferrer">Open Site Explorer</a> or <a href="https://ahrefs.com" rel="nofollow noreferrer">AHREFs</a> to see what your popular posts are from a domain/post authority standpoint and then at least rewrite those so you can keep the link juice happening.</p>

<p><a href="https://www.google.com/webmasters/tools/home" rel="nofollow noreferrer">Google webmaster tools</a> can let you see which pages are breaking when it crawls as well as who's linking to your content. Then do as Tim mentioned in his <a href="https://craftcms.stackexchange.com/a/14778/1016">answer</a> and rewrite those. </p>

<p>The 80/20 rule is probably going to be your friend here, just getting those 20% of popular posts will probably fix 80% of your problem.  Google is smart enough to figure out the rest of your 404s when you submit a sitemap but you still want to keep it as seamless for visitors coming from those old links.</p>

CC BY-SA 3.0
2016-04-24T18:44:05.717Z
2016-04-24T18:49:27.470Z
2017-04-13T12:50:59.930Z
RitterKnight
<p>I migrate my WordPress site into Craft CMS. So far so good. 
But the URLs for most of the Blog Entries are complete new. What's the best way to handle that? My site is good linked on Google and there are a lot of backlinks. It would be nice to have a solution where I can see which pages the Users call and if it a 404. Afterwards I can create rewrite rules for this sites. </p>

<p>Finest way was a Plugin that combine this two features. 
Maybe anyone knows one. </p>

<redirect><migration><htaccess>
Migrate WordPress Site into Craft CMS. How deal with 404's?
# Migrate WordPress Site into Craft CMS. How deal with 404's?

(Asked by: username_0 on 2016-04-23)

I migrate my WordPress site into Craft CMS. So far so good.
But the URLs for most of the Blog Entries are complete new. What's the best way to handle that? My site is good linked on Google and there are a lot of backlinks. It would be nice to have a solution where I can see which pages the Users call and if it a 404. Afterwards I can create rewrite rules for this sites.

Finest way was a Plugin that combine this two features.
Maybe anyone knows one.

**Tags:** redirect, migration, htaccess


---

## 2 answers

### Answer by username_1 on 2016-04-24. Score: 3

David,

I like using [Reroute](https://github.com/davist11/craft-reroute). It's a Craft plugin that lets you create 301s and 302s to any of your entry pages within Craft.

> **Comments:**
> **username_0**: Yeah I used it too but it's more für stuff where I know it comes a 404. But maybe I've a simple but perfect solution with Google Analytics. I track the 404 and generate a redirect with Reroute. Cool was to have it all in one place.  
> **username_1**: Oh I see what you mean. I personally quite found the plugin that will do both, though it surprises me. There is a commercial plugin I've used once called 404 Finder but if you're comfortable getting the same details from GA then it's not going to improve that workflow.  
> **username_0**: @khalwat worked on a plugin like this on. Sounds interesting:  khalwat [1:01 AM]  There are a few good redirect plugins out there; I’m working on one that adds a nice layer that allows you to redirect from URL patterns that key off of imported data  

---

### Answer by username_2 on 2016-04-24. Score: 1

Why are your blog posts' URLs different after you migrated in the first place? Different slugs, URL format, etc? What you did before is going inform what you can do now.  And how did you do the migration? 
I see 2 problems here:

404s
Keeping link juice

If you can solve #1, #2 can take care of itself.
I'd try to get your URLs into same format as what you had for WP and mimic the format. If you can't or won't do that, at least get the post's slug the same as what you had before, then you at least having a fighting chance to try and rewrite what you had into your newer post format.
For example, if you changed /blog/post into news/post or whatever, you might have rewrite rule that looks like:
    RewriteEngine On
    RewriteRule ^blog/(.*)$ /news/$1 [R=301,NC,L]

That'll take care of the format problem but I'm guessing it goes deeper than that. 
How did you import your old content? If your post slugs changed, export the old content from WP into a CSV. You likely just need to export the post title and its slug. 
Then use Bob Olde Hampsink's handy Import plugin to change your post slugs back to what they were before. Just pick your section(s), re-import the title and slug, and leave the rest of the fields untouched.
You might also use something like Moz's Open Site Explorer or AHREFs to see what your popular posts are from a domain/post authority standpoint and then at least rewrite those so you can keep the link juice happening.
Google webmaster tools can let you see which pages are breaking when it crawls as well as who's linking to your content. Then do as Tim mentioned in his answer and rewrite those. 
The 80/20 rule is probably going to be your friend here, just getting those 20% of popular posts will probably fix 80% of your problem.  Google is smart enough to figure out the rest of your 404s when you submit a sitemap but you still want to keep it as seamless for visitors coming from those old links.


---

