While www and non-www versions of site are considered kind of same thing from user perspective, technically they are two completely different domains, possibly hosting completely different sites on different servers.
Since cookies are domain-specific WP treats them accordingly.
It’s not impossible to rework this, since cookie-related functions seem to mostly be pluggable, but really the most common and practical solution is to have canonical version and have other redirect to it.
Related Posts:
- How to set ipv6 address as siteurl?
- Changing www prefix in General Settings and Interior Links
- What does $scheme in site_url function do?
- Get current url with parameters passed
- Override WordPress theme url
- How to Create a Staging Site / Changing URL
- get_template_directory_uri cached?
- WordPress site isn’t reachable after site & home URL modification
- wp_options siteurl and home hardcoded?
- Unable to load WordPress local site after changing WordPress Address (URL) and Site Address (URL)
- can’t access my site [closed]
- Dynamically update Site/WordPress Address
- Does WordPress Strip Away the WWW from a Web Address
- problem with guid, when i change the folder name
- I changed the url from the setting then login panel not working
- Querystring value being stripped from site_url()
- Unable to Update Post when Changing Site URL
- WordPress replaces “https://” with “//” for Site & WordPress-URL
- How to delete blog word from wordpress url?
- Updated Site URL but it is not reflecting the changes
- How to set a home page on a WordPress site?
- Changing siteurl breaks site
- How to add www to images?
- WordPress database nonsense error
- Keeping the URL but changing the site – How?
- change the URL title and tagline
- Is there a way to append a trailing slash to get_home_url() and get_permalink( get_option( ‘page_for_posts’ ) )?
- I changed the site address and wordpress address from localhost to my ip and it doesn’t work anymore
- Changed URL: refused to connect
- What’s the difference between home_url() and site_url()
- When moving a WP site, why does wp-admin redirect to old site?
- What is difference between get_bloginfo(‘url’) and get_site_url()?
- Switching MultiSite installation from HTTP to HTTPS
- Two (or more) parallel (sub-)TLDs that are retained when surfing the site / dynamically set the site address?
- Prevent “main” WPMU site_url() being returned in functions
- Switch from https back to http
- Getting the Site URL Including the Front Base
- How do I change the Multisite URL?
- Relative or dynamic site url possible?
- Rewrite default post type
- How to move existing WordPress wp-content folder along with database to new server and new domain name?
- Difference between bloginfo(‘home’) and home_url() and site_url()
- Ban SiteNames Multisite
- how to use a different domain/subdomain for authors/catagories on single site?
- Wrong canonical link on wp-admin pages
- How to remove /index.php/ from URL’s
- Run WordPress frontend and backend in different domains
- Site redirects to wrong url when saving settings
- WordPress Multisite – Multiple subfolders for blogs
- How to remove “http://” When Echoing URL?
- Dynamic URL to reference custom PHP files
- How to inject custom url path for page ?
- Changing Site Address (URL) causes 404
- WordPress multisite with domain mapping and virtual host on local with fake domain
- Using separate Apache log files for multisite
- Login to wp-admin “redirect_to” points to wrong URL after migration
- root-relative links for multiple parked domains
- Remove HTTP: from the site URL and just keep // in it
- Change homepage url
- (How) Can I change my Multisite Network to use a different blog as Primary?
- Login redirect_to loop with reauth=1, cookie expiry set to 1 year in past
- get url page template
- WP redirects all pages from new domain to old domain
- How to get rid of index.php?
- Woocommerce different URL for every table placed in the restaurant
- Sub-domain or 2nd, temporary different domain?
- URL rewriting for WordPress Network (Multisite) subsite
- Do I need to use the esc_html() function on hard coded links?
- redirect 301 old url to new url
- Multisite without .htaccess
- Why does WordPress rely on an fully qualified site_url with a 15-step plan for moving a site?
- Rewrite-Rules not working on a vhost, everything goes to index.php
- Changing WordPress blog name and web address
- Concatenate site_url and string doesn’t work
- What is the purpose of storing `siteurl` in database?
- Redirect main domain to subdirectory
- Customize multisite site creation with user data
- Getting links to work the same on development and production
- How can I change all links on pages to point to a different domain from where the site is hosted?
- How can I fix a Virtual Multiblog install that has no errors, but won’t show all my sites?
- Remove site root trailing slash
- Modify site URL via functions.php of a theme
- Headless WordPress – Issue with plugin path
- URL parsing – what is it?
- Changing my site url from azure.net to custom domain
- Images not working using Featured post
- Putting my site live
- Remove / from www.example.com/ [closed]
- I don’t see site_url and home_url fields in wp_options table (phpMyAdmin)?
- Avada resources still loading from localhost after database migration [closed]
- Hard code a domain into Yoast SEO canonical URLs
- How to retrieve TLD domain for the current website?
- How to set “Site Address (URL)” programmatically on WP multisite?
- When clicking on “home” page from any other page, it goes to IP address and my website doesn’t load
- Difference between these two nginx try_files statements for WordPress?
- Wrong wp-admin URL
- WordPress URL redirect
- Not Found (404) error on admin page, CSS gone on blog
- Pass GET params to URL from a main menu item
- Split Conference WordPress Page in different years