latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Don't mix WWW and without!

Home Forums Community Forum Don't mix WWW and without!

This topic contains 0 replies, has 1 voice. Last updated by  Jason (Lead Developer) 4 years, 11 months ago.

Topic Author Topic
Posted: Friday Feb 3rd, 2012 at 1:54 am #3534
Staff Member

Some site owners don’t realize that ALL browsers consider variations in your domain as “different”. That is, EVERY browser sees each of these URLs as totally different destinations:

http://example.com/
http://www.example.com/

For this reason, most site owners implement .htaccess tricks to force one version or the other, so that a visitor could type either into their address bar, yet still end up in the right place.

Concerning the s2Member plugin for WordPress®:

If a Member logs in at: ( NOTICE the www. prefix )

http://www.example.com/wp-login.php

their login Cookie will ONLY be recognized on that particular variation of your site.

Now, if you created a link to: ( WITHOUT the www. prefix )

http://example.com/category/juices/

they would NOT be recognized as a logged-in Member, because they originally logged in on another variation of your domain ( with the www. prefix ).

Decide which variation you’re going to use:
Decide early-on which domain variation you’re going to use, and make sure that your installation of WordPress® is configured to match what you intend to use. Check your Dashboard under: Settings -> General. All of the URLs configured in that panel, need to match what you intend to use.

Remain consistent: Be consistent in the way you link to pages on your site. Please do NOT create links on your site that use different variations of your domain. That could result in a visitor logging in on one variation, but clicking links on your site that land them on another variation ( where they may not be recognized as a logged-in Member ).

Related articles:
http://blog.stackoverflow.com/2008/06/dropping-the-www-prefix/
http://www.codinghorror.com/blog/2008/04/the-great-dub-dub-dub-debate.html
http://www.besthostratings.com/articles/force-www-htaccess.html
http://codex.wordpress.org/Changing_The_Site_URL

Forcing one or the other:
http://www.besthostratings.com/articles/force-www-htaccess.html

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.