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
-
Swapping Homepages in WordPress
Hi, Th situation is: I've cloned my homepage & added new content to the cloned page I've then updated the WordPress settings to make the cloned page the new homepage Will I lose PA as the new cloned page is in effect a new article?
Technical SEO | | jasongmcmahon0 -
301 Redirect for multiple links
I just relaunched my website and changed a permalink structure for several pages where only a subdirectory name changed. What 301 Redirect code do I use to redirect the following? I have dozens of these where I need to change just the directory name from "urban-living" to "urban", and want it to catch the following all in one redirect command. Here is an example of the structure that needs to change. Old
Technical SEO | | shawnbeaird
domain.com/urban-living (single page w/ content)
domain.com/urban-living/tempe (single page w/ content)
domain.com/urban-living/tempe/the-vale (single page w/ content) New
domain.com/urban
domain.com/urban/tempe
domain.com/urban/tempe/the-vale0 -
.htaccess redirect question
Hi guys and girls Please forgive me for being an apache noob, but I've been trawling for a while now and i can't seem to find a definitive guide for my current scenario. I've walked into a but of a cluster$%*! of a job, to rescue a horribly set up site. One of many, many problems is that they have 132 302redirects set up. Some of these are identical pages but http-https, others are the same but https-http and some are redirects to different content pages with http-http. A uniform redirecting of http to https is not an option so I'm looking to find out the best practice for reconfiguring these 302s to 301s within .htaccess? Thanks in advance 🙂
Technical SEO | | craig.gto0 -
Identifying a 301-redirect problem?
I was looking at the Search Engine Optimization reports for one of my clients in Google Analytics, and I saw that their two biggest landing pages are www.website.com and http://website.com. Does this mean that Google is serving both the 'www' and 'non-www' versions of the website, and thus harming the website's overall ranking? Thanks for any input!
Technical SEO | | williammarlow0 -
Redirect from old wordpress site to new php site? Best approach
Hi I have two websites one legacy site done in wordpress the other in php. However I would like to merge the two together and remove the wordpress site. However it has a good link profile and the pages rank well. What is the best approach to do a 301 redirect from the old site with all its pages pointing to the homepage of the new site? If so what's the best way to do this in wordpress? Many thanks
Technical SEO | | ocelot0 -
Can I do a redirect to a new domain name only a couple of weeks after having redirected to another domain?
I have a client with two website with very similar content. Both had a lot of inbound links and performed fairly well in SERPS. We recently combined both sites and have redirected one of the domains to the other. The traffic dipped slightly initially, but is recovering nicely. Now the client registered a new domain name he would like to use for the site. Should I wait a few weeks for everything to settle down after the first redirect/consolidation of sites before doing a new redirect to a new domain name, or should I not worry about having any issues with doing it right away?
Technical SEO | | Drewco0 -
Redirecting a domain
I was setting up a new campaign and received the following error from Roger Robot. "We have detected that the domain www.sitename.com and the domain sitename.com both respond to web requests and do not redirect. Having two "twin" domains that both resolve forces them to battle for SERP positions, making your SEO efforts less effective. We suggest redirecting one, then entering the other here." I know about redirecting a PAGE using 301 Redirects and how to specify the www. canonical in Google webmaster tools, but is there a "DOMAIN" redirect that I'm missing. What would you suggest doing given the error message above. Thanks, Bill Sqnch.jpg
Technical SEO | | Marvo0 -
What should be noindexed on a Wordpress blog?
I know this can be a "it depends" answer so I'll try to explain. Qualifications on your answers would be great. I use the Wordpress architecture for myself and clients on sites and blogs. Almost every business site we create has a blog and I'm always working to improve results on them. My strategy has been the following: Categories: General, main content types, general keywords. Index, follow Tags: Very specific, post specific, may only be used once for one post. My categories have descriptions that are displayed on the category pages with excerpts. Tags rarely have a description but are displayed with excerpts on the page. My idea has been to index the categories to crawl the content and they have unique content by showing the category description. Tags shouldn't be archived because they may be all over the place and may have only 1 post with no tag description. I'm trying to reduce duplicate content but I don't want to limit results for my clients and myself. Should I set tags to noindex, follow or should I have them indexed? The only thing I'm thinking with having the tags indexed is that I may be able to get additional traffic through the more specific tags (i.e. tag = meta tags, category = SEO).
Technical SEO | | JaredDetroit0