Redirect 301
-
Hi,
I `m redirecting some pages in htaccess
The first 15 pages that i redirected it worked. But the last 3 dont work, and i cant figure it out why it is not working.
Redirect 301 /analyseverktoy/ /webanalyse
Redirect 301 /index.php/ledige-stillinger/ /
Redirect 301 /?page_id=352/ /Anu suggestions?
-
And when you look at the final URLs in the address bar of your browser, do these URLs that return 404 errors correspond to the URLs you set up with the Redirect rule?
Usually when your redirects are messed up you get 500 Internal Server errors, not 404 errors.
Maybe the problem is not in how you defined the redirects in the .htaccess file, but you are choosing the incorrect URLs to redirect to.
-
I get a 404. page not found.
The strange part is that some are working and the other ones are not.
-
If you defined the redirect rules correctly and some works and some don't check if these new defined rules don't conflict with others previously declared. What errors do you get?
-
Any suggestions why it does not work or how we can fiks it?
-
Thanx, one of them is working...but the other ones stil dont work....
Working: Redirect 301 /index.php/ledige-stillinger/ http://mysite.com/
Not Working:
Redirect 301 /?page_id=352/ http://mysite.com/
Redirect 301 /googleanalitycskurs/ http://mysite.com/googleanalyticskurs
Redirect 301 /sokemotoroptimalisering-tips/ http://mysite.com/sokemotoroptimaliseringtips/Thank you for the advice.
-
That's exactly how I do mine. The full URL is what you are missing. You need the http:// in it.
-
It doesn't work because you are not doing it correctly
The Redirect command has 3 parameters:
1. The redirect type (in your case 301)
2. The location of the file/directory you want redirected relative to the root of your site
3. the full URL of the location you want that request sent toYou are mistaken the third parameter, because you are not putting there the full path. You should put something like this:
Redirect 301 /analyseverktoy/ http://www.yoursite.com/webanalyse
Redirect 301 /index.php/ledige-stillinger/ http://www.yoursite.com/
Redirect 301 /?page_id=352/ http://www.yoursite.com/
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
-
HSTS Redirects
Hi Are these 307 redirects bad for SEO? They've just popped up on an audit & I haven't seen them before. I'm guessing as they're temporary they should be updated. Thanks Becky
Intermediate & Advanced SEO | | BeckyKey0 -
Wrong redirect used
Hi Folks,
Intermediate & Advanced SEO | | Patrick_556
I have a query & looking for some opinions. Our site migrated to https://
Somewhere along the line between the developer & hosting provided 302 redirect was implemented instead of the recommended 301 (the 301 rule was not being honured in the htaccess file.)
1 week passed, I noticed some of our key phrases disappear from the serps 😞 When investigated, I noticed this the incorrect redirect was implemented. The correct 301 redirect has now been implemented & functioning correctly. I have created a new https property in webmaster tools, Submitted the sitemap, Provided link in the robots.txt file to the https sitemap Canonical tags set to correct https. My gut feeling is that Google will take some time to realise the problem & take some time to update the search results we lost. Has anyone experienced this before or have any further thoughts on how to rectify asap.0 -
Going from 302 redirect to 301 redirect weeks after changing URL structure
I made a small change on an ecommerce site that had big impacts I didn't consider... About six weeks ago in an effort to clean up one of many SEO-related problems on an ecommerce site, I had a developer rewrite the URLs to replace underscores with hyphens and redirect all pages throughout the site to that page with the new URL structure. We didn't immediately update our sitemap to reflect the changes (bad!) and I just discovered all the redirects are 302s... Since these changes, most of the pages have a page authority of 1 and we have dropped several spots in organic search. If we were to setup 301 redirects for the pages that we changed the URL structure would there be any changes in organic search placement and page authority or is it too late?
Intermediate & Advanced SEO | | Nobody16116990439410 -
SEO impact of 301 redirects based on IP addresses from a specific state
Hello Moz Community! We are facing an issue that may or may not be unique, but need some advice and/or clarification on the best way to address the issue. We recently rebranded and launched a new site under a new domain and things have been progressing well. However, despite all the up front legwork on trademarks and licensing, we have recently encountered a hiccup that forces us to revert to the old URL/branding for one specific state. This may be a temporary issue that lasts a couple of months or it could potentially be in the court system for a couple of years. One potential solution we have discussed is to redirect the new site to the old site based on IP addresses for the state in question. Looking for any guidance on what type of impact this may have on SEO. Also open to any other suggestions or guidance on dealing with this situation. Thanks
Intermediate & Advanced SEO | | VeteransFirstMarketing0 -
Should I redirect my xml sitemap?
Hi Mozzers, We have recently rebranded with a new company name, and of course this necessitated us to relaunch our entire website onto a new domain. I watched the Moz video on how they changed domain, copying what they did pretty much to the letter. (Thank you, Moz for sharing this with the community!) It has gone incredibly smoothly. I told all my bosses that we may see a 40% reduction in traffic / conversions in the short term. In the event (and its still very early days) we have in fact seen a 15% increase in traffic and our new website is converting better than before so an all-round success! I was just wondering if you thought I should redirect my XML sitemap as well? So far I haven't, but despite us doing the change of address thing in webmaster tools, I can see Google processed the old sitemap xml after we did the change of address etc. What do you think? I know we've been very lucky with the outcome of this rebrand but I don't want to rest on my laurels or get tripped up later down the line. Thanks everyone! Amelia
Intermediate & Advanced SEO | | CommT0 -
How do I best handle Duplicate Content on an IIS site using 301 redirects?
The crawl report for a site indicates the existence of both www and non-www content, which I am aware is duplicate. However, only the www pages are indexed**, which is throwing me off. There are not any 'no-index' tags on the non-www pages and nothing in robots.txt and I can't find a sitemap. I believe a 301 redirect from the non-www pages is what is in order. Is this accurate? I believe the site is built using asp.net on IIS as the pages end in .asp. (not very familiar to me) There are multiple versions of the homepage, including 'index.html' and 'default.asp.' Meta refresh tags are being used to point to 'default.asp'. What has been done: 1. I set the preferred domain to 'www' in Google's Webmaster Tools, as most links already point to www. 2. The Wordpress blog which sits in a /blog subdirectory has been set with rel="canonical" to point to the www version. What I have asked the programmer to do: 1. Add 301 redirects from the non-www pages to the www pages. 2. Set all versions of the homepage to redirect to www.site.org using 301 redirects as opposed to meta refresh tags. Have all bases been covered correctly? One more concern: I notice the canonical tags in the source code of the blog use a trailing slash - will this create a problem of inconsistency? (And why is rel="canonical" the standard for Wordpress SEO plugins while 301 redirects are preferred for SEO?) Thanks a million! **To clarify regarding the indexation of non-www pages: A search for 'site:site.org -inurl:www' returns only 7 pages without www which are all blog pages without content (Code 200, not 404 - maybe deleted or moved - which is perhaps another 301 redirect issue).
Intermediate & Advanced SEO | | kimmiedawn0 -
301 redirect
I have 2 websites, lets call them Website A and Website B. Website A is a commercial website, website B is a 7 years old blog. Website B has many natural, high quality BL, including some from Nytimes, etc. I want to integrate the blog (B) into the commercial website (A). The idea behind this thought is to compress the two websites, it is easier to have everything in one place. I will do this with 301 redirect via Webmaster tools, htaccess etc. The uRL structure will remain the same: eg: websiteB/post-title/ -> websiteA/post title What will happen with my quality BLs? Is there any chance to be penalized by Google? What will happen with the PR of the 2 sites? Thanks.
Intermediate & Advanced SEO | | jasmin281 -
301 Redirect - What happens to backlinks
Hello... One of my sites is losing rankings in G. I received the webmaster notification of unnatural links... My question is, should i do a 301 redirect of every page on my site to a new domain? If so, do the backlinks (which i believe are causing my rankings to drop) carry over? How about the good backlinks? Also, what would happen to the rankings i currently have on page 1? Thanks
Intermediate & Advanced SEO | | Prime850