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
-
Selective 301 redirections of pages within folders
Redirection Puzzle - it's got me puzzled anyhow! The finished website has just been converted from an old aspx affair to a wordpress site. Some directory structures have changed significantly; there appears to be a load of older medical articles that have not been added back in and it sounds unlikely that they will be. Therefore unmatched old news articles need to be pointed to the top news page to keep hold of any link value they may have accrued. The htaccess file starts with ithemes security's code, Followed by the main wordpress block and I have added the user redirects to the final section of the htaccess file . I have been through the redirects and rewrites line by line to verify them and the following sections are giving me problems. This is probably just my aging brain failing to grasp basic logic. If I can tap into anybody's wisdom for a bit of help I would appreciate it. My eyes and brain are gone to jelly. I have used htaccesscheck.com to check out the underlying syntax and ironed out the basic errors that I had previously missed. The bulk of the redirects are working correctly. #Here there are some very long media URLs which are absent on the new site and I am simply redirecting visiting spiders to the page that will hold media in future. Media items refuse to redirect
Technical SEO | | TomVolpe
Line 408 redirect 301 /Professionals/Biomedicalforum/Recordedfora/Rich%20Media%20http:/kplayer.kcl.ac.uk/ess/echo/presentation/15885525-ff02-4ab2-b0b9-9ba9d97ca266 http://www.SITENAME.ac.uk/biomedical-forum/recorded-fora/ Line 409 redirect 301 /Professionals/Biomedicalforum/Recordedfora/Quicktime%20http:/kplayer.kcl.ac.uk/ess/echo/presentation/15885525-ff02-4ab2-b0b9-9ba9d97ca266/media.m4v http://www.SITENAME.ac.uk/biomedical-forum/recorded-fora/ Line 410 redirect 301 /Professionals/Biomedicalforum/Recordedfora/Mp3%20http:/kplayer.kcl.ac.uk/ess/echo/presentation/15885525-ff02-4ab2-b0b9-9ba9d97ca266/media.mp3 http://www.SITENAME.ac.uk/biomedical-forum/recorded-fora/ #Old site pagination URLs redirected to new "news" top level page - Here I am simply pointing all the pagination URLs for the news section, that were indexed, to the main news page. These work but append the pagination code on to the new visible URL. Have I got the syntax correct in this version of the lines to suppress the appended garbage? RewriteRule ^/LatestNews.aspx(?:.*) http://www.SITENAME.ac.uk/news-events/latest-news/? [R=301,L] #On the old site many news directories (blog effectively) contained articles that are unmatched on the new site, have been redirected to new top level news (blog) page: In this section I became confused about whether to use Redirect Match or RewriteRule to point the articles in each year directory back to the top level news page. When I have added a redirectmatch command - it has been disabling the whole site! Despite my syntax check telling me it is syntactically correct. Currently I'm getting a 404 for any of the old URLs in these year by year directories, instead of a successful redirect. I suspect Regex lingo is not clicking for me 😉 My logic here was rewrite any aspx file in the directory to the latest news page at the top. This is my latest attempt to rectify the fault. Am I nearer with my syntax or my logic? The actual URLs and paths have been substituted, but the structure is the same). So what I believe I have set up is: in an earlier section; News posts that have been recreated in the new site are redirected 1 - 1 and they are working successfully. If a matching URL is not found, when the parsing of the file reaches the line for the 1934 directory it should read any remaining .aspx URL request and rewrite it to the latest news page as a 301 and stop processing this block of commands. The subsequent commands in this block repeat the process for the other year groups of posts. Clearly I am failing to comprehend something and illumination would be gratefully received. RewriteRule ^/Blab/Blabbitall/1934/(.*).aspx http://www.SITENAME.ac.uk/news-events/latest-news/ [R=301,L] #------Old site 1933 unmatched articles redirected to new news top level page RewriteRule ^/Blab/Blabbitall/1933/(.*).aspx http://www.SITENAME.ac.uk/news-events/latest-news/ [R=301,L] #------Old site 1932 unmatched articles redirected to new news top level page RewriteRule ^/Blab/Blabbitall/1932/(.*)/.aspx http://www.SITENAME.ac.uk/news-events/latest-news/ [R=301,L] #------Old site 1931 unmatched articles redirected to new news top level page RewriteRule ^/Blab/Blabbitall/1931/(.*)/.aspx http://www.SITENAME.ac.uk/news-events/latest-news/ [R=301,L] #------Old site 1930 unmatched articles redirected to new news top level page RewriteRule ^/Blab/Blabbitall/1930/(.*)/.aspx http://www.SITENAME.ac.uk/news-events/latest-news/ [R=301,L] Many thanks if anyone can help me understand the logic at work here.0 -
301 Redirects
Hi, I have switched my site from a http .co.uk site to a https .com site. I have set a 301 redirect in the .htaccess file pointing all traffic going to the original .co.uk site to go to the new https: RewriteEngine on
Technical SEO | | imoprojects
RewriteCond %{HTTP_HOST} ^up-bus.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www.up-bus.co.uk$
RewriteRule ^(.*)$ "https://www.up-bus.com/$1" [R=301,L] however when i search in google for keywords the original .co.uk site is still registering in search, is there something else I am required to do to tell google to use the new https site instead? Do i need to do redirects for every page, or is what I have done above sufficient? Hope you can help, I am struggling with getting our site to register on google search, any advice greatly welcome Thanks in advance, Ian0 -
301 Redirect
Hello Moz Community, I have a question regarding 301 redirecting a new domain that contains keywords relevant to my website. However, I do NOT want to change my current domain. My main question is, by just redirecting this new domain to my current website, will those keywords in the new domain help with ranking in anyway? Thanks in advance for any help!
Technical SEO | | WyzeOwl0 -
Maintaining Link Value Of Old URLS With 301 Redirects
Large ecommerce site that has been around for a long time (15+ years.) During that time technology has changed a lot and we are running into issues maintaining 301 redirects for very old urls. For example we have a good amount of links to product and category pages. Some of the old links are to products that still exist and will exist for many years to come.(of note little to no traffic comes via these links. Most of them are close to 9 years old so they are buried deep within articles, forums, or websites) However as we make changes to the site and URL structure these old urls are taking up more resources to continue to maintain 301 redirects. I am Leary of no longer supporting them because I do not want it to impact rankings however there is concern on how much development time and technology resources it takes to continue to support as time goes on. Does anyone have experience handling redirects 3 or 4 url structures old? Looking for insight from someone who has crossed this bridge before.
Technical SEO | | RMATVMC0 -
301 redirect relative or absolute path?
Hello everyone, Recently we've changed the URL structure on our website, and of course we had to 301 redirect the old urls to the coresponding new ones. The way the technical guys did this is: "http://www.domain.com/old-url.html" 301 redirect to "/new-url.html"
Technical SEO | | Silviu
meaning as a relative redirect path, not an absolute one like this:
"http://www.domain.com/old-url.html" 301 redirect to "http://www.domain.com/new-url.html" This happened for few thousands urls, and the fact is the organic traffic dropped for those pages after this change. (no other changes were made on these pages and the new urls are as seo friendly as possible, A grade on On-Page Grader). The question is: does the relative redirect negatively affects seo, or it counts the same as an absolute path redirect? Thanks,
S.0 -
301 redirects reverting to 302 redirects
We recently built a new website with a new site structure. To prevent there being a load of 404's I redirected the old pages to the new relevant pages with 301 redirects. A few days later the SEOmoz crawl report alerted me to a load of 302 redirects. When I looked into this for some reason all of the 301 redirects I set up are reverting to 302 redirects. I did a test by 301 redirecting a made up URL to an existing page and the same thing happens - it 302 redirects. I can't find any settings in WordPress to possibly explain why this is happening. Has anyone got any ideas why this could be?
Technical SEO | | Tone_Agency0 -
301 Redirect How Long until the juice passes through to new site
Hi Guys, Following on from a question i asked last week in regard to a 301 http://www.seomoz.org/q/301-redirect-have-no-ranking I was thinking that i had some kind of issue on the site, although i have gone over it with a fine tooth comb i cannot find any issue's and from the amount of reads the thread has had im sure if there was something obvious it would have been pointed out. So i am quite confident the 301 from site A to site B is fine and working as intended, so my question is how long should it take until the juice is passed From site A to Site B as its 9 weeks now and still down 85% on traffic and even text for my home page if copied into the search bar don't bring up my site Bing is fine and did not see any real traffic drops but Google is not giving me back the rankings i had prior Whenever i have done a 301 before the rankings pretty steady and i see no real loss in rankings but this time ... painful all changes in WMT made
Technical SEO | | kellymandingo
Canonical tag implemented
all Pages 301 and correct 200 response from the targeted page
Sitemap Updated
Many Links Changed from Old site to new (including DMOZ)
no Robots text Blocking directory's
Google crawling freely and regularly The strange thing is New content is indexed immediately and ranks easily, I added a page for my service in my local area and went straight to position 5 in Google however old existing content wont move, I tracked 150 keywords only 4 are top 75 Don't know what else to do so any advice would be much appreciated PS site is around 17k pages Paul0 -
If I redirect my WordPress blog to my main site, will it help my main site's SEO?
I have separate sites for my blog and main website. I'd like to link them in a way that enables the blog to boost my main site's SEO. Is there an easy way to do this? Thanks in advance for any advice...
Technical SEO | | matt-145670