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
-
301 Redirects
Looking for the best way to do the following. Business has changed its name, and has also become a corporate store. The old domain name is now no longer needed as a website page has been created inside the main corporate site. Obviously i dont want to loose all the traffic that we had and want to redirect them but there is a problem, that im unable to redirect the old domain to the new one due to office 365 installed on the hosting platform, and the old emails will need to run for another 6 months. I can remove the old site and put a landing page up, but i still need to redirect all the pages to the new site, and there is approx 50+ of them. My main question is i currently have atleast 50+ redirects already in there due to seo changes over the years, some would go back atleast 5 years, whats a safe amount of time that i can remove the older redirects And am i going about this the right way so i dont loose all the hard work on rankings etc
Technical SEO | | Dunjoko0 -
Which better to rank with 40 DA domain redirect the domain 301
hello, which better to rank with 40 DA domain redirect the domain 301 to my website or host domain and create posts with my website link + if i do the 301 redirect the Crawl Errors of old 40 da domain will display on my new website or not+how much links can i get from one website pbn
Technical SEO | | cristophare79
+
which better get links for home page or postsbest regards ,0 -
301 Domain Redirect And Old Domain to a New one including pages
Hi, I need to 301 an old domain to a new one (new website) I need to 301 the domain to a new page not the new domain direct for example www.olddomain.co.uk to www.newdomain.co.uk/pagenew Then I need to also 301 all the other pages on the old domain to the new one for example... www.oldmain.co.uk/oldpage to www.newdomain.co.uk/newpage Issue is I can do one or the other not both, I can get the other pages to redirect but then the main domain wont redirect to the correct new page. Or I can get the old domain to redirect but not the internal pages. Thanks
Technical SEO | | David-Sharpe0 -
Proper 301 redirect code for http to https
I see lots of suggestions on the web for forwarding http to https. Â I've got several existing sites that want to take advantage of the SSL boost for SEO (however slight) and I don't want to lose SEO placements in the process. Â I can force all pages to be viewed through the SSL - that's no problem. Â But for SEO reasons, do I need to do a 301 redirect line of code for every page in the site to the new "https" version? Â Or is there a way to catch all with one line of code that Google, etc. will recognize & honor?
Technical SEO | | wcksmith10 -
Do you still loose 15% of value of inbound links when you redirect your site from http to https (so all inbound links to http are being redirected to https version)?
I know when you redesign your on website, you loose about 15% internally due to the 301 redirects (see moz article: https://moz.com/blog/accidental-seo-tests-how-301-redirects-are-likely-impacting-your-brand), but I'm wondering if that also applies to value of inbound links when you redirect your http://www.sitename.com to https://www.sitename.com. I appreciate your help!
Technical SEO | | JBMediaGroup0 -
301 redirect from sites closing down
Hi We have around 10 supplementary sites that have links to our site which are now closing down but are out of our control.  We could have access to their domains so how could we maintain the link juice from these old sites which are going to our new site? However there will be no websites left on these old supplementary just domain names
Technical SEO | | ocelot0 -
Is there ever a time when 301 redirects aren't possible?
I have been told that 301 redirects are always possible.  I've been told that it's a very time consuming process so developers at times will say that it's not possible. Is there ever a time when it is not impossible? Perhaps using a specific server? I know it's do-able in Apache which is the server that is in question. Would it be impossible if someone were using a templated type set of websites & if they made changes on one website it would make changes across all websites? *Edit "due to a server configuration 301 redirects aren't possible" Thanks so much for any help or answers you can provide.
Technical SEO | | DCochrane0 -
301 Redirect with an Exact Domain name Match
My Client had a site that ranked for a pretty competitive two word phrase, but for a variety of reasons had to transfer the site to a different domain name (with none of the previous keywords). We've 301'd everything just fine to the new site, but our traffic for that two word phrase, as well as related long tail traffic, is beginning to drop. Could the drop be related to something that we didn't do well in the transfer? Or is it due to the new domain name now not being an exact match? Sitenote question: Our Google Analytics is still set up for the former domain name and shows data just fine. Is there any reason to switch GA to the new domain? What are the pros/cons? Much thanks in advance!
Technical SEO | | TrevorMcKendrick0