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
-
cross canonicalization with redirect
I'm working with a website that has turned one of its pages into its own website within the main website - mostly for the ease of customers, making it simpler to access that page using www.page.com rather than www.mainsite.com/about/page.
Technical SEO | | Shrine.SEO.Gal
As a result, there are two urls for that page (the ones just mentioned), both pointing to the exact same page, but with different urls. Now, they have made it so www.mainsite.com/about/page permanently redirects to www.page.com. which I thought was a good call. However, what do I do about canonicalization? Is it good to point the canonicalization of www.page.com to www.mainsite.com/about/page so that the rankings and link equity are maintained in the main website? Or would the fact that the www.mainsite.com/about/page redirects to www.page.com mess that up? I hope this makes sense!0 -
Redirect chain being flagged in Moz
I have a redirect chain being flagged in Moz, this is the first time I have come across this, and Im convinced its causing an issue, the site is performing very badly. I have attached screen grabs of the redirect chain. and the site is cotswold flat roofing Is this redirect chain causing me an issue, and what is the best practice for getting it fixed or removed, the site currenly does not even show up in Google even when searching for its won brand, I removed an x robot noindex a week ago, and now the only issue that I can see is this redirect chain 6pOpGNU
Technical SEO | | Donsimong0 -
301 redirects without .htaccess
I have a client that recently moved from an old ZenCart e-commerce site to Volusion. The domain name did not change. We need to redirect a bunch of the old URLs; however, Volusion's redirect tool does not work for URLS with "?" . The old ZenCart structure is: http://www.mydomain.com/index.php?main_page=product_info&products_id=563 Volusion is a hosted platform and we do not have access to the .htaccess file. Any suggestions on a workaround? Thanks!Nancy <colgroup><col width="960"></colgroup>
Technical SEO | | NancyVPS
| |0 -
301 Redirect Have no ranking
Hi Guys wonder if you can help my site www.economy-car-leasing.co.uk has just been 301 from www.economyleasinguk.co.uk The reason for the move is the site is going to be structured for both cars and vans separately we did the 301 around 8 weeks ago and initially we thought everything went well, all the new site was indexed within 24 hours, we updated WMT on the old site we monitored around 150 keywords many were top 10 in Google 99% were top 5 pages However 8 weeks on we do not rank for hardly anything, i have confirmed all the redirects are working, we have 200 ok from the home page and all the other canonical pages return 301 we just implemented the canonical tag to all pages. we did factor that we will get some down time but not 8 weeks worth, i have done a 301 on this scale before with no real loss of rankings (Different site) Really tempted to put the old site back however its not what i want to do, Bing seems to have picked up on the change really well but im thinking Google just needs time The change looks like its done perfectly and everything is working as it should however it looks like that none of the original rankings or juice has been pushed over from Google yet and im wondering how long does it typically take to get the site ranking again site have gone from 17k unique s per month to less than 2k Paul
Technical SEO | | kellymandingo0 -
Domain redirect seo
Hello, my domain www.pacomarca.com and when i start the new campaing i get this pronblem: We have detected that the domain www.pacomarca.com and the domain pacomarca.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. my domain is in networksolutions.com. how can i resolve it? many thanks Gonzalo
Technical SEO | | Kuna0 -
Can I redirect a URL that has a # in it? How?
Hi there - My web developer is saying that I can't do a URL redirect with a "#" in it. Currently, the URL is actually an anchored link within a page (which the URL indicates with a #). I want to change the content to a new URL, but our website links internally to the old URL, so we would need to do a URL redirect (assume 301). Can you tell me if this is possible and how? Thanks!
Technical SEO | | sfecommerce0 -
301 Redirect Question
I'm working on a site that has a lot of indexed pages and backlinks to both domain.com and www.domain.com. Will using a 301 redirect to send domain.com to www.domain.com merge all of the indexed pages and links over to www.domain.com, thereby strengthening the www?
Technical SEO | | Yo_Adrian0 -
301 redirect on the root of the site
Due to some historic difficulties with our URL Rewriter, we are in the position of having the root of our site 301 redirected to another page. So the root of our site: http://www.propertylive.co.uk/ has a 301 redirect to: http://www.propertylive.co.uk/home.aspx We're aware that this isn't great and we're working to fix this completely, but what impact will this have on our SEO?
Technical SEO | | LianWard860