Support » Fixing WordPress » SEO Friendly Redirect

  • Resolved leMaxim


    By harnessing the power of Google I’ve discovered ways to resolve the www vs no-www issue out there. However, which way is (more) correct (than the others)?

    The simplest is:

    Redirect 301 /
    (but it has variations like PermanentReidrect?)

    Then I found:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^YourSite\.com [nc]
    RewriteRule (.*)$1 [R=301,L]

    What’s the difference between this and the above?

    Which one of these is the standard (or which is better)?

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • bump

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    There is no actual difference between the two you posted. They have exactly the same effect and impact. The server will send identical responses in both cases (a 301 permanent redirect).

    However, the first requires that the server be running mod_alias, while the second requires mod_rewrite. Some servers have one, some have the other, some have both. If they have both, then the first one is slightly faster, in theory.

    So if the first one works, use that. If it doesn’t seem to work, try the second one.

    If you’re modifying things, be careful with the first one. Redirect directives can be trickier than they appear. Rewrite rules seem more complex, but they are at least explicit.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘SEO Friendly Redirect’ is closed to new replies.