WordPress.org

Ready to get started?Download WordPress

Forums

301 Redirect Question (www to non-www) (7 posts)

  1. dirkd80
    Member
    Posted 6 years ago #

    Is taking out the “www.” in both the wordpress and blog address under “general options” in the admin panel the same thing as doing a 301 redirect (www to non-www) in the htaccess file?

    I've read somewhere that in WP 2.3 version, the 301 redirect code is no longer needed in the htaccess file, and I wanted to know if this was the solution.

    thanks,

    Dirk

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    WordPress 2.3 has a new feature called "canonical URLs" which will indeed redirect www to non-www or vice-versa.

    Whenever you reach a WordPress page and the URL does not match what WordPress thinks the actual permalink is, it redirects to the correct permalink (301).

    So whatever you have as the URL on the Options->General page will be assumed to be the correct URL and will get redirected to if needed.

  3. dirkd80
    Member
    Posted 6 years ago #

    thank you otto

    so the canonical url feature is just automatic and there is nothing I need to do to activate it?

    I was putting the 301 redirect code in the htaccess file to avoid duplicate content. so now after version 2.3 that code is no longer needed in order to prevent the dup content?

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    so the canonical url feature is just automatic and there is nothing I need to do to activate it?

    Yes.

    I was putting the 301 redirect code in the htaccess file to avoid duplicate content. so now after version 2.3 that code is no longer needed in order to prevent the dup content?

    Correct. That was the purpose of it, to force search engines to get redirected to the correct URLs and eliminate dupe content issues.

  5. goatlip
    Member
    Posted 6 years ago #

    I've upgraded to 2.3.3 and it doesn't looks like solidsmack.com is redirecting to http://www.solidsmack.com

    I've looked at other sites on 2.3.x and the www pops up when you enter only thesite.com

    any ideas?

  6. Jeff Starr
    Member
    Posted 6 years ago #

    I am not sure if this will help, but I recently wrote an article sharing my customized htaccess technique for comprehensive WordPress permalink canonicalization. It works at the Apache level (via htaccess) and thus saves a few server resources by avoiding extraneous PHP processing. Works great for ALL versions of WordPress. Check it out at:

    http://perishablepress.com/press/2008/01/16/comprehensive-htaccess-canonicalization-for-wordpress/

  7. aparachitt
    Member
    Posted 6 years ago #

    Read The post from below link to have a proper Guide to add www to yours wordpress Url
    Link - http://scrapur.com/index/wordpress/add-remove-or-redirect-www-to-wordpress-domain-url/

    This is working to me .

Topic Closed

This topic has been closed to new replies.

About this Topic