Mobile app version of vmapp.org
Login or Join
Chiappetta492

: Is there an easier way to implement 301 redirects when converting a site to WordPress I have just converted a website to WordPress. The old site has hundreds of hard-coded html files, and the

@Chiappetta492

Posted in: #Apache #GoogleSearch #Redirects #SearchEngines #Seo

I have just converted a website to WordPress. The old site has hundreds of hard-coded html files, and the new site does not match the old site's directory structure or file naming system (bad SEO in the original site), so I can't place any "blanket" 301 redirects. Its been at least 2 months, and the old links are still appearing in Google searches, despite a google-friendly sitemap.xml.

Do I need to hardcode a 301 for every individual page in my htaccess file, or am I just misunderstanding 301s and apache? Is there some other way I can update Google about the fact that my entire site structure has changed?

10.05% popularity Vote Up Vote Down


Login to follow query

More posts by @Chiappetta492

5 Comments

Sorted by latest first Latest Oldest Best

 

@BetL925

I suggest you another plugin for wordpress, that i use on two sites administered by me, EggPlants 301 redirects. This plugin don't fill the .htaccess file with new rules, but use the internal routing system of wordpress. With this you can import the redirect rules by a cvs file, getted from the google webmaster tool and editet to include the new path.

10% popularity Vote Up Vote Down


 

@Yeniel560

I'd say look for some pattern you can use to get close, for example match the title tags, or if the directory structure includes a category IE example.com/category/product.html then set patter to redirect all URLs with "category" to the new category page. It's certainly not as good as redirecting them to the appropriate product page, but it's better then just leaving them all as 404s. There's almost always some kind of convention even if it's a poorly thought out one. (Also assuming you still have all the files you can run Xenu Link Sleuth on them to make sure you get all the pages, even if Google has removed them from the index for being a 404, you'll want to redirect them as there may be some links pointing to them).

Good Luck.

10% popularity Vote Up Vote Down


 

@Pope3001725

Google search with the string site:mysite.com to get a full dump of all the URLs that are indexed, or go ahead and use Google's Webmaster's Tools and get a list of 404's from them. Then, yes, you will need to manually construct a 301 redirect list.

You can import a file into WordPress › Redirection « WordPress Plugins to generate redirections and log them, too.

10% popularity Vote Up Vote Down


 

@Cofer257

If there are any patterns at all to the redirects then you can cut down on the number of redirects in the htaccess file.

Failing that, you could instead rewrite all the *.html files to a PHP script that reads the redirects from a file or database, for example. You'd still need to manually input everything into said file or database, but you would cut down the size of the htaccess.

10% popularity Vote Up Vote Down


 

@Kristi941

Based on the information you provided I'd say it doesn't look like there is an easy way for you to easily do a bulk 301 redirect, either programmatically or with a blanket .htaccess rule. It looks like you will need to manually do one for each page you migrated over to the new site.

Each page will need it's own 301 as you will want to make sure every link for each page is properly redirected to its new page. Otherwise every page on your new site will be considered new and start from scratch with PR, etc. If you had a lot of incoming links it may be a hassle to do but is very well worth it.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme