5

I am in the process of removing duplicate content (or URLs) issue on my website. There are hundreds of similar content links on my website where both URLs one without trailing slash and one with trailing slash results in the same page. For e.g https://example.com/faq and https://example.com/faq/.

To fix this issue I have added the forward slashes in the URL (only GET ones) where they are missing by adding a 301 redirect in .htaccess. Now I want to go live with these changes, and to be on the safer side I want to first use the 302 redirect and then after some time if no issue comes then will change it to 301.

Why I am doing this because in case of incorrect 301 redirect customers will be redirected incorrectly to some other location or may see 404 error and then it would be difficult to fix the issue from my end (server side) and the only way to fix it be to flush the cache of browser cache in client's machine.

I would like to know if this is a good approach or not? And if there are any other ways to do it?

4

It is always a good idea to "test" with 302 (temporary) redirects in order to avoid the caching of erroneous redirects - as you have stated. Ordinarily "testing" is just a matter of running your own tests in development before going live.

tl;dr I don't see any problem in going live with a 302 in this instance and changing to 301 later.

The "only" duplicate URLs you appear to be dealing with here are "trailing slash" vs "no-trailing slash". You should already be linking to the canonical version throughout your site (the one "with" the trailing slash by the sounds of it). This should also be expressed in the rel="canonical" tag. So, realistically, you don't really have a duplicate content issue - it is unlikely that Google would consider the slash-less URL as canonical or even pick this up under normal circumstances.

Just to stress... it is important that you are correctly linking to the canonical URL throughout - you should not try to "fix" incorrect internal links with a 3xx redirect.

If, however, you were changing a URL structure and redirecting old to new URLs then it may not be advisable to go "live" for any period of time with a 302 redirect. Test with 302 - yes, go "live" - questionable.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.