Redirects 301
-
Hello,
I need to reedirect a URL of a page that I have in my site (http://digitaldiscovery.com.pt/servicos-de-marketing-digital/publicidade-online/) to a new URL with SEO porpuses. Whats the best way to this?
I use Wordpress btw.
Tks in advance!
PP
-
Awesome guys. I think I can manage from here. Tks alot for sharing the knowledge
-
Hi Pedro,
I agree with the replies so far. 301 is the best for SEO.
If you already have a .htaccess file then just put one more line into it, similar to the following
redirect 301 ./my-page.html http://www.mysite.com.au/my-new-page.html
If you don't then just make a plain text file and name it .htaccess, put this code into it, and then ftp it to the root of your site.
It will all just work like magic if you have an Apache server or similar. If you have a windows server or something else, then you may in for some more legwork to get the redirect to work.
This is the best approach for non cms websites. For websites like Wordpress you have many more options available through plugins... Yay...!
HTH
-
An htaccess file is one way to do it as a previous response suggested, but there are some easier options. If you're already using an SEO plugin on your Wordpress site, check to see if it has a 301 redirect field and then go enter the new url you'd like it redirected to on the post or page. If you don't have an SEO plugin or one with that option you can easily install a new redirect plugin. I've used "Quick Page/Post Redirect DEV" and I'd recommend it. This also allows you to copy and paste the new url in a field on the post or page and choose the type of redirect you'd like. Make sure to do a 301 if this is a permanent change.
-
The best way to do this is by adjusting the .htaccess file. The htaccess file directs traffic to the correct page very quickly and efficiently. (An alternative would be to go through WordPress but typically this isn't an efficient alternative.)
The htaccess file is located in the root directory - /httpdocs, /public_html, etc.
At the very end of the htaccess file, add a new line and on that line, you will want to use a line like this. Update the URLs to match whatever you want to redirect from and to.
redirect 301 /servicos-de-marketing-digital/publicidade-online/ http://digitaldiscovery.com.pt/new-page-url-here
The first URL (after redirect 301) is the old URL you are redirecting from. This needs to be a relative URL back to the root directory of the website. The second URL (after the space) is the URL to the new page you are redirecting to. This needs to be an absolute URL (even if it is on the same site).
A couple words of warning on the htaccess file:
First, make sure your URLs do not have any special characters and if they do, make sure you escape them. (Space becomes %20, for example.)
Second, before making any changes to your htaccess file definitely create a backup of what the current htaccess file is. If you make a mistake in the htaccess file it can return an internal server error for your entire site. So, be prepared to roll back if something doesn't go quite right!
There is a good resource on htaccess 301 redirects here. It also talks about a meta refresh option but I'd avoid that as it isn't as good for search engine purposes.
http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm
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
-
Robots txt. in page with 301 redirect
We currently have a a series of help pages that we would like to disallow from our robots txt. The thing is that these help pages are located in our old website, which now has a 301 redirect to current site. Which is the proper way to go around? 1- Add the pages we want to disallow to the robots.txt of the new website? 2- Break the redirect momentarily and add the pages to the robots.txt of the old one? Thanks
Technical SEO | | Kilgray0 -
Virtual inlcude v.s. Redirect 301
Hi there, I manage a website which use a lot virtual includes ( SSI) because it caused a lot of duplicate content i introduced the Canonical url tag. But i still see bad rankings on some pages who are the leading of the virtual includes. Now i'am wondering is it better to remove all the virtual include pages ( url's) and make a redirect 301 of it. Does anybody know that is better for ranking the head page?
Technical SEO | | JoostBruining0 -
Simple 301 redirect a subfolder to another subfolder
Hi, I have a number of sub-folders that I have to move, each of which contains a number of files. subfolder A has files a, b & c subfolder B has files d, e & f
Technical SEO | | aactive
subfolder C has files g, h & i A, B & C folders need to be X, Y & Z Will the following work? RewriteRule ^subfolder-A/* http://www.domain.com/subfolder-X/ [R=301,L]
RewriteRule ^subfolder-B/* http://www.domain.com/subfolder-Y/ [R=301,L]
RewriteRule ^subfolder-C/* http://www.domain.com/subfolder-Z/ [R=301,L] will this result in visitors to http://www.domain.com/subfolder-B/f.html being redirected to http://www.domain.com/subfolder-Y/f.html? All on the same domain. in reality we are talking hundreds of sub folders and thousands of files so we don't want to have to reference every file individually in the htaccess. Thanks0 -
301 Redirect / cross-domain canonical to a URL w/ Ampersand
I have a question regarding ampersands, we are needing to redirect to a URL w/ an ampersand in the URL: http://local.sfgate.com/b18915250/Sam-&-Associates-Insurance-Agency Will Google pass page authority/juice despite the fact that there is an ampersand in the URL, if we were to 301 redirect or cross-domain canonical to the url? Should we 301 redirect to http://local.sfgate.com/b18915250/Sam-%26-Associates-Insurance-Agency instead of http://local.sfgate.com/b18915250/Sam-&-Associates-Insurance-Agency? I don't have the option of removing the ampersand Thank you for your time!
Technical SEO | | Gatelist0 -
Need Help writing 301 redirects in .htaccess file
SEOmoz tool shows me 2 errors for duplicate content pages (www.abc.com and www.abc.com/index.html). I believe, the solution to this is writing 301 redirects I need two 301 redirects 1. abc.com to www.abc.com 2. /index.html to / (which is www.abc.com/index.html to www.abc.com) The code that I currently have is ................................................... RewriteEngine On
Technical SEO | | WebsiteEditor
RewriteCond %{HTTP_HOST} ^abc.com
RewriteRule (.*) http://www.abc.com/$1 [R=301,L] Redirect 301 http://www.abc.com/index.html http://www.abc.com ...................................................... but this does not redirect /index.html to abc.com. What is wrong here? Please help.0 -
What tools produce a complete list of all URLs for 301 redirects?
I am project managing the rebuild of a major corporate website and need to set up 301 redirects from the old pages to the new ones. The problem is that the old site sits on multiple CMS platforms so there is no way I can get a list of pages from the old CMS. Is there a good tool out there that will crawl through all the sites and produce a nice spreadsheet with all the URLs on it? Somebody mentioned Xenu but I have never used it. Any recommendations? Thanks -Adrian
Technical SEO | | Adrian_Kingwell0 -
Why is a 301 redirected url still getting indexed?
We recently fixed a redirect issue in a website, and although it appears that the redirection is working fine, the url in question keeps on getting crawled, indexed and cached by google. The redirect was done a month ago, and google shows cached version of it, even for a couple of days ago. Manual checking shows that its being redirected, and also a couple of online tools i checked report a 301 redirect. Do you have any idea why this could be happening? The website I'm talking about is www.hotelmajestic.gr and its being redirected to www.hotel-majestic.gr
Technical SEO | | dim_d0 -
301 Redirect vs Domain Alias
We have hundreds of domains which are either alternate spelling of our primary domain or close keyword names we didn't want our competitor to get before us. The primary domain is running on a dedicated Windows server running IIS6 and set to a static IP. Since it is a static IP and not using host headers any domain pointed to the static IP will immediately show the contents of the site, however the domain will be whatever was typed. Which could be the primary domain or an alias. Two concerns. First, is it possible that Google would penalize us for the alias domains or dilute our primary domain "juice"? Second, we need to properly track traffic from the alias domains. We could make unique content for those performing well and sell or let expire those that are sending no traffic. It's not my goal to use the alias domains to artificially pump up our primary domain. We have them for spelling errors and direct traffic. What is the best practice for handling one or both of these issues?
Technical SEO | | briankb0