Static site to wordpress - avoiding 301 redirects
-
Moving our static website to wordpress, pages currently end in the .htm extension and for reasons of me having to do all the moving myself and wanting to preserve link equity is there any way I can run the pages with a .htm extension in Wordpress?
Tried using a plug-in by Daddy Design but it seems a bit hit and miss at times.
I basically need to keep the url's the same as I will not be able to get the vast majority of my links altered to the new pages, plus I am doing this by myself!
-
Yep, my bad. Pages seem to function under their own permalink rules (not sure why, I think most people would prefer the same permalink structure for posts and pages.)
Did some quick research and looks like many others have the same issue and the only solution is to try out the available plugins.
You can change the .htaccess code to append .htm to the url but WP won't be able to locate the proper post unless you change the settings in the db as well (which is what I assume the plugins do).
-
Thanks Chris,
Any ideas how I would go about the HT access file method?
-
Unfortunately the method method Oleg raised only works for Posts and not pages...
So you have a choice either write a PHP script and load it as a plugin or make some amendments to your .htaccess
-
Still cannot do it! Using latest wordpress, the only thing I can think of is I am using Pages?
I'll try again tomorrow
-
Hmmm, seems to be working for me. I had /%category%/%postname%/ as my permalink and changed it to /%category%/%postname%.htm
End result was all the posts/pages had .htm added to the url.
Latest version of WP? I'll test this out on another WP site I have and see if I get the same results.
Update: Yep, worked on my other site too. Not sure why you're experiencing problems =/
-
It's not working for me! Whenever I enter .htm it turns the dot into a hypen?
-
Is it as easy that?!
I shall give it a go and see how I get on! Thank you!
-
Go to your WP dashboard > Settings > Permalinks > Custom Structure > Enter /%postname%.htm
Then for each post/page you make, just edit the URL to match your previous site's structure.
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
-
301 Redirects Showing As 307 Redirects
Hi, Our clients are adamant that they have set up 301 permanent redirects on their websites, but when we check using Screaming Frog and various online HTTP status code checkers they are showing as 307 temporary redirects. Examples;
Technical SEO | | Webpresence
http://www.lifestylelifts.co.uk/home-lifts/
http://www.terrylifts.co.uk/ Again, the client says they are seeing 301 redirects. Why are we seeing 307's? Who is right? Very puzzling, any theories would be very much appreciated 🙂 Thanks in advance. Lee.0 -
.htaccess Redirect 301 issues
I have completely rewritten my web site, adding structure to the file directories. Subsequently added was Redirect information within the .htaccess file. The following example ...
Technical SEO | | Cyberace
Redirect 301 /armaflex.html http://www.just-insulation.com/002-brands/armaflex.html
Returns this response in the URL bar of ...
http://www.just-insulation.com/002-brands/armaflex.html?file=armaflex
I am at a loss to understand why the suffix "?file=armaflex" is added The following code is inserted at the top of the file ...
RewriteEngine On redirect html pages to the root domain RewriteRule ^index.html$ / [NC,R,L] Force www. prefix in URLs and redirect non-www to www RewriteCond %{http_host} ^just-insulation.com [NC]
RewriteRule ^(.*)$ http://www.just-insulation.com/ [R=301,NC] Any advice would be most welcome.0 -
To avoid errors in our Moz crawl, we removed subdomains from our host. (First we tried 301 redirects, also listed as errors.) Now we have backlinks all over the web that are broken. How bad is this, from a pagerank standpoint?
Our MOZ crawl kept telling us we had duplicate page content even though our subdomains were redirected to our main site. (Pages from Wineracks.vigilantinc.com were 301 redirected to vigilantinc.com/wineracks.) Now, to solve that problem, we have removed the wineracks.vigilantinc.com subdomain. The error report is better, but now we have broken backlinks - thousands of them. Is this hurting us worse than the duplicate content problem?
Technical SEO | | KristyFord0 -
Way to spider Wordpress site
I have an old Wordpress site and I want to move it to a new server and take it off Wordpress (too many hacks). I am trying to spider the site so as to get static, non-Wordpress, pages. I am having trouble doing this. When I spider the site, it changes the URLs. For instance, if the URL is www.domain.com/page/ the URL I get out of the spider is /page/index.html And those are not the URLs in the search engine indices. There are about 2000 pages on this site, so it is not feasible to set up 301 redirects. I tried using these spidering programs: WinHTTack Website Copier and PageNest Does anyone know of another method of turning a Wordpress site into a non Wordpress site?
Technical SEO | | DanCrean0 -
260k 301 redirects
Hello, I just found that some of the urls on my site have both ugly characters and some other things I'd like to fix (such as ---- into a single - ) After some local tests i've seen that If i leave some imperfections there will be 48k different urls on the other hand if the renaming procedure is strict i'll have around 260k out of 2.3M urls to be renamed. If I'm going to do this I'll create new canonicals meta tag and redirect old urls with 301 headers to the new location. The content will not change. My big doubt is SEO wise, I know that I'll have better urls, but aren't those too much redirects on a single day? what would you do if you wish to have shipshape urls and know some of these are crap? thanks
Technical SEO | | mylittlepwny0 -
301 Redirect NOT Working as Expected - HELP!
Hi! I just launched our newly coded site and just realized the installed 301 is NOT working. The URL string is the same EXCEPT for the removal of /shop/. Here is the code in .htaccess: ############################################ enable rewrites Options +FollowSymLinks RewriteEngine on #RedirectMatch 301 ^/shop?/$ http://hiphound.com/ RedirectMatch 301 ^/shop?/$ http://hiphound.com ########################################### When I go to Google and click on an old link I get a 404. No bueno!! Here is an example: http://hiphound.com/shop/rubit-dog-tag-clip I thought (and was told) that the installed 301 would send this page to: http://hiphound.com/rubit-dog-tag-clip It's not. Please HELP!! 🙂 What am I doing wrong??? Lynn
Technical SEO | | hiphound0 -
301 Redirects
Hello, I have a problem with my website. I have a page on my website http://www.ensorbuilding.com/page.php/aboutus but if i type in www.ensorbuilding.com/page.php/aboutus/f8e45e9d9df6140bb5a7ff1173e8d828 or www.ensorbuilding.com/page.php/aboutus/0f0eea5e9ab0a3e8d91fad8fc0d3ce9c it still displays the about us page. Google is seeing this as duplicate content so what I would want to do is 301 redirect anything after www.ensorbuilding.com/page.php/aboutus . How could I implement a 301 redirect in this way?
Technical SEO | | danielmckay70 -
Wordpress 301 redirects
I use wordpress as CMS on a few sites and I noticed that word press automattically places 301s if I change a url etc. I believe it does it by having the following in the .htaccess file: BEGIN WordPress<ifmodule mod_rewrite.c="">RewriteEngine OnRewriteBase /RewriteRule ^index.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]</ifmodule> END WordPress Should I use this? I feel like it limits my control over the 301s.
Technical SEO | | mmaes0