Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8836059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:24:17+00:00 2026-06-14T09:24:17+00:00

My WordPress installation appears to only like logging people in using the www. subdomain

  • 0

My WordPress installation appears to only like logging people in using the www. subdomain and forces the www. subdomain for most links. However I would like it so when someone logs into my site at http://www.mysite.com and mysite.com, it logs them in in both places on wordpress. Among other reasons this is because my wordpress installation is riddled with www and non-www links.

In PHP this is normally done by leaving the “domain” parameter of setcookie() empty/null or for older browsers, specifying a dot prior to the domain, IE “.mysite.com”.

Is there any way to get wordpress to perform this behavior?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T09:24:18+00:00Added an answer on June 14, 2026 at 9:24 am

    You can only have one or the other.

    1. Under ‘General Settings’ in your WP control panel, specify your address in your preferred way, ie. with or without ‘www’.
    2. Assuming you are on a server running apache: create one of the following .htaccess files in the root of your site.

     

    # Redirect www urls to non-www
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www\.yoursite\.com [NC]
    RewriteRule (.*) http://yoursite.com/$1 [R=301,L]
    

     

    # Redirect non-www urls to www
    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^www\.yoursite\.com
    RewriteRule (.*) http://www.yoursite.com/$1 [R=301,L] 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a fairly complex WordPress + bbPress installation and I would like to
My website - http://www.myhomecare.ie - is a Wordpress Installation using the Sterling theme which
I have a WordPress installation. I would like to have one folder in the
I have a wordpress installation I'd like to get rid off. It's been constant
I'm using Phing to push a wordpress installation to my production server. Is it
I had this Wordpress installation which was installed in a subfolder (not root). Like
I am trying to rewrite http://www.domain to http://domain in a wordpress installation, but it
I changed the folder that my WordPress installation was in. However, this worked fine,
I have a WordPress installation at Subdomain. I wish to have the website display
I have a clean WordPress installation using Twenty Eleven, with no plugins or other

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.