I use mod_rewrite to rewrite https://example.com/?page=some-page&tab=2 to https://example.com/articles/some-page/2. But people can still access both URLs.

I want to know: should I redirect the "ugly" URL to the friendly URL?

Does that improve my SEO? And why?


You only need to redirect the "ugly" URL if you had changed the URL structure and the "ugly" URLs had already been indexed by search engines and/or linked to by third parties. In this case, it is essential to redirect the old "ugly" URLs in order to preserve SEO and possibly prevent duplicate content issues.

However, if you implemented the "pretty" URLs from the very beginning - and these are the only URLs being referenced, then it's unlikely that redirecting the "ugly" URLs would make any difference in terms of SEO. You should already have the appropriate rel="canonical" tags in-place, which further negates the requirement to implement redirects from the "ugly" URLs.


It creates duplicate content issue and Search Engines dislike duplicate content. Ugly url MUST be validly redirect to seo friendly URLs to avoid duplicate content/pages issue.

  • 3
    I wouldn't agree. Google knows how to handle a 301 correctly. Presuming, of course, that you serve the 301 to everyone including Googlebot... If you serve content to Googlebot but a redirect to the public, that's cloaking And top of the no-no list. – Harper Dec 27 '18 at 20:31
  • 3
    @Harper "I wouldn't agree." - I'm not sure what you are "disagreeing" with? That would seem to be what the answer is already saying? – MrWhite Dec 27 '18 at 22:44
  • This is a myth and a legend. Google already dismissed that allegation many times (see support.google.com/webmasters/answer/66359). It has no problems with it whatsoever and if you specify the canonical address in the page, it'll even be happy. – Gábor Dec 28 '18 at 14:04
  • Also, Google explicitely asks you not to do a 301 redirect unless you want to deprecate that page. See support.google.com/webmasters/answer/139066 – Gábor Dec 28 '18 at 14:13

Much ado is made of optimizing URLs for SEO. However, the real importance of URL shaping is preserving bookmark and external link traffic. Keyword-stuffing URLs is an old, cheap trick, and search engines give it very little weight because it's so easy to abuse.

And it makes stupid URLs that are hard to type. Even more laughably, breaking external links breaks PageRank/link relevance. These days every search engine also makes a browser, so with a little snooping, they can also use user bookmarks to rank. So preserve that organic traffic, it is more than organic. Some people say "never 404 any page"; I heartily agree and this is why.

There are no 404s in my log, except for human-fatfingered URLs, and that's usually me lol.

Of course, reality is that you do change web platforms from time to time, and you get locked out of using your traditional URL. That's where the HTTP response "301 Permanent Redirect" comes in, because Google and Bing certainly understand a 301, and PageRank and other factors will follow the 301. Upshot: 301 is essential.

Some lousy websites redirect all 404s to the homepage. Seriously, how often do you then stay on that website? You don't, you leave. So does Google, they know that you have destroyed the specificity that their searcher wants, so the search engine discards the page-level rank factors. The site had them, the site wasted them, and they get to start over.

Anyway, what you propose is exactly the right thing: redirect content to its specific mate page that has the same content, or at least content that is equally specific.

Your hope is that the "pretty URL" will provide better SEO. I don't put a lot of stock in that, as said. However, I certainly do put stock in the search engine doing a better job indexing and ranking "static" pages like site.com/dir/subdir/page.html than dynamic pages like site.com/engine.cgi?param=value&param=value. The latter is often redundant to static pages elsewhere, search results of an internal search engine, or a black hole (infinite, recursive links). Because of the diminished value, and risk of black hole, crawlers are skittish about indexing those deeply.


Although there is an accepted answer already, I still felt the need to make a complete description, based on Google's own recommendations rather than various legends floating around the net.

Basically, the important part is that duplicate content is not frowned upon, no matter what the legends say. Google expects it to happen all the time because this is how practically all CMS systems work. When there are two URLs (Google's documentation mentions exactly your case), one is almost always supposed to be better, the SEO and human friendly one. Make sure that all your pages, no matter what URL variant they respond to, all feature the canonical URL you want Google to use. If you don't do that, Google will guess; and while it probably gets it right most of the time, it's always better if you do it yourself. If you do so, no matter how Google arrives at that page, it'll note the canonical address and will use it to refer to the page in all search results.

301 redirection is only used for pages to be retired, to make both engines and users aware of the need to move to the new URL permanently. Google asks you only to use redirection in this specific case, and never redirect just because you have a duplicate URL. URL preference is determined by the canonical URL tag, not by redirecting.


Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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