Wordpress and Redirects?
-
I want to update my permalinks - actually I want to change the URL's to fit the content and keywords better. I can choose "edit" the URL, but don't I need a redirect? I don't see any htaccess Plugin installed.......is that what I need to be able to change my URL's in Wordpress?
-
Access .htaccess via Cpanel > File Manager (select view hidden files) or use and FTP program. Don;t rely on yoast. Not everyone uses Wordpress or yoast. Also Yoast can break with wp updates.
-
Hi Courtney! Did you see Dan's response to your question?
-
Hi Courtney
It should be under Yoast->Edit Files -- see this screenshot. If it's not there, are you using some sort of special host for WordPress? You're using WordPress.ORG (not .com)?
I agree that its good for you to learn, but .htaccess is something that can take down your site with one misplaced character, so I would be careful if you're going to edit it. Have a friend you can call on who might know how to fix it if something goes awry. Also, you should have FTP access readily available, in case it does break, that's how you're going to get in and fix it.
Certainly not discouraging you from learning it - just be careful and have FTP access in case you need it!
-Dan
-
All great answers guys! Thanks. Still a little confused which way to go, as it seems I have a few options. I already have Yoast installed. Where is the htaccess in wordpress?
I think I need to learn the correct way also as big spin suggests. I have been writing content for over a year, but 301's is something I haven't mastered yet.
-
Highly suggest the idea by Dan... Yoast SEO is the great plugin!
-
I recommend you learn the correct way of 301 redirects as it's handy with other CMS like Joomla or Drupal etc.
Hopefully you're using cpanel. Login to Cpanel, go to redirects tab. Create the redirect. When using Wordpress, you won't see any changes. Go back to Cpanel home and login to File Manager. Ensure to select view hidden files.
In File Manger select edit code .htacccess.
From here you will see the redirect code thnat you created in Cpanel a moment ago at the bottom. Cut and Paste this and move
It will look like this:
BEGIN WordPress
<ifmodule mod_rewrite.c="">RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]</ifmodule>END WordPress
RewriteCond %{HTTP_HOST} ^yourdomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.yourdomain.com$
RewriteRule ^sample-page/$ "http://www.yourdomain.com/" [R=301,L]You now need to move the rewrite so it appears above #BEGIN WordPress, like below. Presto. 301s work. You don;t need to worry about plugins breaking etc.
RewriteCond %{HTTP_HOST} ^yourdomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.yourdomain.com$
RewriteRule ^sample-page/$ "http://www.yourdomain.com/" [R=301,L]BEGIN WordPress
<ifmodule mod_rewrite.c="">RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]</ifmodule>END WordPress
-
Try this plugin : http://wordpress.org/plugins/change-permalink-helper/
I have had good success with it . As with any plugins test it out after you deploy .. there might be conflicts with other plugins or with the theme you are using
-
Thanks for that! Just want to add for Courtney - if she uses Yoast SEO plugin, you can also edit .htaccess right in wordpress without having to FTP.
-
I agree John this is the most user friendly way to do the redirects. The only thing I would add is - shut OFF the features which automatically adds redirects when you change URLs. It sounds like a nice feature, but it can get confusing because I found it to do them automatically a little too aggressively. Best to use the plugin but keep it on manual.
-
I think you could use a redirect plugin for this, for example this one here. This way you don't have to manually edit .htaccess. Just make sure the resulting URLs are using 301 redirects. It looks like there are a lot of plugins for this, so try a few out and see which you like the best!
As you change your URLs, keep track of the old and new URL mappings, and add those redirects to the plugin.
-
Hello,
Yes, if your pages are indexed and you want to change the URLs then a 301 redirect is your best bet. Edit the URL on the page or post you are looking to edit. Then add the redirect to the .htaccess file. You may need to create one to add to the root directory of your wordpress install. The general .htaccess file looks like this.
BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
END WordPress
Just add in the redirect to the end of this file. It could look something like..
redirect 301 /old-page http://www.something.com/new-page
Then you should be all set.
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
-
Redirect 410
I used http status code as 410 for some low quality pages in my site to Redirect to homepage. is this useful to improve my homepage authority?
Technical SEO | | ghorbanimahan
my website is: Nitamoshaver.com0 -
Redirecting a blog
We've acquired another company and want to redirect their soon-to-be-obsolete website to ours. It includes a blog with many blog posts. Should we: only 301 redirect the top level blog URL
Technical SEO | | Caro-O
try redirect individual blogs to blogs of a similar topic on our site (least practical I'm sure)
redirect all their individual posts to our main blog URL Thanks, Caro1 -
SEO Redirect
If we have several hundred domain names currently using a park page, would we be better served having them redirect to our corporate homepage for SEO purposes?
Technical SEO | | mkessler0 -
Temporary Redirect - on nonexistant URL
I'm getting a Temporary Redirect issue on | http://www.luckygemstones.com/botswana-legends.htm http://www.luckygemstones.com/botswana-legends.htm | http://www.luckygemstones.com/page-not-found.htm | 1 | 0 | 302 | YET! There is no such page on my site. I believe I had one once, but has been corrected for a while now. WHY is SEOMOZ picking this up as an error and how can I fix? Kathleen http://www.luckygemstones.com
Technical SEO | | spkcp1110 -
Wordpress Redirect Plugin Vs Manual .htaccess?
Hi everyone, I need to 301 redirect my old pages to new ones but i am confused between whether to choose plugin for this or i should manually rewrite the code on .htaccess file. Please give your suggestion and if you think i should use plugin then which one?
Technical SEO | | himanshu3019890 -
301 redirects
Hello. Our site was recently rebuilt, and we switched from using index.php in all the urls to not using it at all. We also changed the names of many of our pages. So the urls have been renamed from "example.com/index.php/old_page_name/" to "example.com/new-page-name/". While we were at it, we changed from "_" to "-" as our word separators in the urls. In the .htaccess file, we have a small block of code that strips out "index.php/" from all requests. This code redirects a request for "example.com/index.php/old_page_name/" to "example.com/old_page_name/" For your information, the code that strips out "index.php/" is: RewriteCond %{THE_REQUEST} ^GET.index.php [NC]
Technical SEO | | nyc-seo
RewriteCond %{THE_REQUEST} !/uSZWTLna/.
RewriteRule (.?)index.php/(.*) /$1$2 [R=301,L] Then we have 301 redirects from "example.com/old_page_name/" to "example.com/new-page-name/" QUESTION 1: Is this two-step redirect approach okay, or would it be better to skip the separate index.php stripping code and simply have 301 redirects that include "index.php" in the urls? QUESTION 2: Will we lose some of the benefit of the links that have to pass through a 301 redirect? QUESTION 3: We have 50 or so redirects. Will this affect performance of the site? How many redirects does it take to start affecting performance? Thank you!0 -
Wordpress multilanguage sitemaps
Hi, I have a multilingual wordpress site. which is in Bulgarian and English - translated using qtranslate. The xml sitemap of the 2 languages is in one sitemap file- all the links for the Bulgarian and English version are in one file. (Our web is using this plugin - http://wordpress.org/extend/plugins/google-xml-sitemaps-v3-for-qtranslate Do you have any idea how can I make separate xml sitemap for every language? I ask you here because may be you have identical problems with your multilanguage wordpress website. You can see the sitemap with 2 languages links in one sitemap here: http://cholakovit.com/ sitemap.xml Cholakov IT I have read from this article that it is better practise and also it will help with geo-targetazing your web site: http://www.seomoz.org/blog/multiple-xml-sitemaps-increased-indexation-and-traffic
Technical SEO | | vladokan0 -
Redirecting 404
Hi. I'm working on a wordpress site, which got some old deleted pages indexed and now shows a 404 (also in the results) As these old pages earlier got content and probably also some links pointing towards it, what would then be best practice to do? Should i make an 301 redirect? Make the 404 noindex?
Technical SEO | | Mickelp0