Correct Redirect method for switching pages from .html to /pretty urls/
-
I have a customer that has all his site files as .html extensions and i'm going to rebuild this site into a wordpress site for easier management,
regarding the new permalink structure, should i just do a 301 redirect on this?
-
thaanks Chris!
-
Yes, most definitely. I just did the exact thing. I moved a site that had originally been on asp classic, then moved to php, now to word press. The .asp pages were being processed as php by the server, and there were hundreds of pages. Within two weeks of moving site to WordPress and doing the redirects I saw immediate ranking results. Here are just a few redirects, the way I was making them:
redirect 301 /about-fort-worth-personal-injury-lawyer.php /about-for . . .
redirect 301 /arlington-personal-injury-lawyer-locations.php /arlingto . . .
redirect 301 /injury-law-news.php /injury-law-news/
redirect 301 /asbestos-claim.asp /asbestos-claim/
redirect 301 /auto-accident.asp /auto-accident/
redirect 301 /burns.asp /burns/
.
.
.Here are the steps I took to save time.
- I created an xml sitemap at one of those free online sitemap creators and downloaded as CSV.
- Used the list in php script I wrote to scrape the text from each page on the old site and insert into the WordPress database using the file name as title (replacing - with space) and droping .asp or .php
- I recreated the redirects in Exel by combining a column of the old filenames and the newly created ones. Cut and pasted.
- The new url's were in Google in about 10 days.
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
-
What do you do with product pages that are no longer used ? Delete/redirect to category/404 etc
We have a store with thousands of active items and thousands of sold items. Each product is unique so only one of each. All products are pinned and pushed online ... and then they sell and we have a product page for a sold item. All products are keyword researched and often can rank well for longtail keywords Would you :- 1. delete the page and let it 404 (we will get thousands) 2. See if the page has a decent PA, incoming links and traffic and if so redirect to a RELEVANT category page ? ~(again there will be thousands) 3. Re use the page for another product - for example a sold ruby ring gets replaces with ta new ruby ring and we use that same page /url for the new item. Gemma
Technical SEO | | acsilver0 -
Pages with 301 redirects showing as 200 when crawled using RogerBot
Hi guys, I recently did an audit for a client and ran a crawl on the site using RogerBot. We quickly noticed that all but one page was showing as status code 200, but we knew that there were a lot of 301 redirects in place. When our developers checked it, they saw the pages as 301s, as did the Moz toolbar. If page A redirected to page B, our developers and the Moz toolbar saw page A as 301 and page B as 200. However the crawl showed both page A and page B as 200. Does anyone have any idea why the crawl may have been showing the status codes as 200? We've checked and the redirect is definitely in place for the user, but our worry is that there could be an issue with duplicate content if a crawler isn't picking up on the 301 redirect. Thanks!
Technical SEO | | Welford-Media0 -
My website's pages are not being indexed correctly
Hi, One of our websites, which is actually a price comparison engine, facing indexing problem at Google. When we check “site:mywebsite.com “, there are lots of pages indexed which are not from mywebsite.com but from merchants websites. The index result page also shows merchant’s page title. In some cases the title is from merchant’s site but when the given link is accessed it points to mywebsite.com/index. Also the cache displays the merchant’s product page as the last indexed version rather than showing ours. The mywebsite.com has quite few Merchants that send us their product feed. Those products are listed on comparison page with prices. The merchant’s links on comparison page are all no-follow links but some of the (not all) merchant’s product pages are indexed against mywebsite.com as mentioned above instead of product comparison page of mywebsite.com How can we fix the issue? Thanks!
Technical SEO | | digitalMSB0 -
Should I Use the Disavow Tool to for a Spammy Site/Landing Page?
Here's the situation... There's a site that is linking to about 6 articles of mine from about 225 pages of theirs (according to info in GWT). These pages are sales landing pages looking to sell their product. The pages are pretty much identical but have different urls. (I actually have a few sites doing this to me.) Here's where I think it's real bad -- when they are linking to me you don't see the link on the page, you have to view the page source and search for my site's url. I'm thinking having a hidden url, and it being my article that's hidden, has got to be bad. That on top of it being a sales page for a product I've seen traffic to my site dropping but I don't have a warning in GWT. These aren't links that I've placed or asked for in any way. I don't see how they could be good for me and I've already done what I could to email the site to remove the links (I didn't think it would work but thought I'd at least try). I totally understand that the site linking to me may not have any affect on my current traffic. So should I use the Disavow tool to make sure this site isn't counting against me?
Technical SEO | | GlenCraig0 -
Do links that point to an old URL retain value if we have the correct redirects?
I've recently taken over SEO for my company. There are a lot of old links that point to our old URL (www.examplecountry.com changed to (www.examplewhatwedo.com). We have the correct redirects in place and Open Site Explorer shows many of the links pointing to the old site even though I'm inputting the new URL. I just want to put my mind at rest that any value these links have doesn't got lost due to the URL change. Unfortunately a lot of them have the old URL as the anchor text....which I guess will decrease their quality? Thanks!
Technical SEO | | MarbellaSurferDude0 -
Is it a problem to have a homepage with a slug / URL ?
Hi, We are designing a web site for one of our clients, and using a home made CMS. I don't know how this CMS has been built, but anyways, in the end the homepage has a URL format which looks like this : www.mydomain.com/my-custom-url.html. No www.mydomain.com. Is it dangerous for SEO to have a slug/URL directly on the homepage ? Do you have experiences, cases where it has impacted a site negatively ? The main problem I expect is duplicate content (with Google seeing both www.mydomain.com and www.mydomain.com/my-custom-url.html as being different pages) but apparently the CMS is doing a 302 redirect from the root domain to the URL (I told my colleague it should at least be a 301). Sorry if this question seems like basic SEO knowledge, but I really can't find a definitive answer on the subject. Thank you very much 🙂
Technical SEO | | edantadis0 -
301 Single Page Redirects in IIS7?
Hey all -- I am working with a client, getting ready to make a full domain level change to a brand new domain. The existing domain has solid domain importance and trust, and the home page has a 5/10 GPR, so the transfer of all existing link juice is very important. Of course, I will be utilizing 301's to permanently redirect all existing pages to their new permanent homes. It will be a 1-1 structure, which I know is also best when possible. My question comes in specific to IIS. There is a wealth of information out there on the net regarding implementing permanent 301's using Apache and .htaccess, but nada when it comes to doing it in IIS7, which is what the client is using. For instance, today I am seeking to help them redirect 2 single pages to new destinations within the same domain, just diffferent folders. When you open up the IIS7 Control Panel (yes, with full Admin access), you can navigate to the directory, but the individual pages that I am looking to redirect with 301's do not show in IIS7, so you can't just right click on each page and choose "A redirection to a URL," etc. Any help on exactly how to redirect a single page using a permanent 301 in IIS 7 would be huge! Thanks guys!
Technical SEO | | Bandicoot0 -
Why is a 301 redirected url still getting indexed?
We recently fixed a redirect issue in a website, and although it appears that the redirection is working fine, the url in question keeps on getting crawled, indexed and cached by google. The redirect was done a month ago, and google shows cached version of it, even for a couple of days ago. Manual checking shows that its being redirected, and also a couple of online tools i checked report a 301 redirect. Do you have any idea why this could be happening? The website I'm talking about is www.hotelmajestic.gr and its being redirected to www.hotel-majestic.gr
Technical SEO | | dim_d0