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
- Switching MultiSite installation from HTTP to HTTPS
- Prevent “main” WPMU site_url() being returned in functions
- Getting the Site URL Including the Front Base
- Relative or dynamic site url possible?
- Run WordPress frontend and backend in different domains
- Remove HTTP: from the site URL and just keep // in it
- (How) Can I change my Multisite Network to use a different blog as Primary?
- Woocommerce different URL for every table placed in the restaurant
- Do I need to use the esc_html() function on hard coded links?
- Redirect main domain to subdirectory
- Modify site URL via functions.php of a theme
- Headless WordPress – Issue with plugin path
- URL parsing – what is it?
- Hard code a domain into Yoast SEO canonical URLs
- When clicking on “home” page from any other page, it goes to IP address and my website doesn’t load
- WordPress URL redirect
- Pass GET params to URL from a main menu item
- What do the schemes login, login_post, admin, and relative mean?
- How do I retain url parameters the entire time a user browses my site?
- WordPress Multi-Site on Ubuntu 18.04 LAMP Keeps Re-Directing
- How to bulk edit image url in featured image and product description?
- Multisite with different domain names on different servers
- WordPress keeps redirecting me to online site [closed]
- WordPress: how to change URL for individual MultiSites?
- get_template_directory_uri not dependent on WP_HOME in wp-config.php?
- Get the URL of the page from which an ajax request has been launched within ajax callback
- Changing the website URL to the root folder
- Changing the color scheme based on the url visited
- Publishing WordPress from stage to production server
- Redirect htaccess [closed]
- How to return site_url() without https://
- Showing my server ip in source code for several links not for all links
- How to Use Custom Meta Field Instead of CPT Title in Post URL
- Replace “http://localhost:8888/” by website URL in WordPress
- dynamic site link for future migration in echo do_shortcode()
- Page inside custom post type (url rewrite?)
- Cannot access WordPress website from external IP while internally it is working properly [closed]
- Proper way to have multiple installs with a single database
- Plugin Development – Get Admin Url (Including cases where wp-admin is not used)
- Preventing Canonical Redirect for CDN
- mamp pro virtual hosts with wordpress
- Abnormal activity at url /my-account/add-payment-method/
- How to make a seo friendly URL of 2 different pages with same words
- How to point domain to wordpress page
- How to access wordpress from domainB which is installed at domainA
- Colon is Missing In My Website Url in WordPress Shortcode
- WordPress is adding “category” word before my actual category name in url (and this is unsolicited)
- WP returns to domain root instead of siteurl
- WordPress Multisite loads wrong subdomain dashboard
- SSL not working fine, Home url not matching with site url wordpress errors
- Why my URL has an unknown character string?
- Plesk login inaccessible after changing site URL
- WordPress Multisite with Wildcard Certificates not mapping correctly
- There is how to change url domain on some posts?
- How to properly give WordPress its own directory
- Duplicate WP Migration affecting site on separate domain?
- MAMP PRO with SSL and WordPress – Cannot access interior pages of site
- My permalinks for all pages and posts now include old page titles as parents/categories
- WordPress switch domains
- Remove index.php from URL (WP installed in subdirectory)
- Homepage cannot be found
- All styles are looking for the site URL twice
- Unable to get WordPress’s apply_filters(‘site_url’) to return a https scheme
- Blog broken after changing Site/Home URL
- Moving Site: Is Re-downloading Files After Changing URLs necessary?
- Two domain site: Link base URLs point to wrong domain
- How to retrive previous Domain URL in Wp
- Multiple WordPress on Virtual Host
- Install WordPress MU outside htdocs
- Configure VirtualHost for a perfect WordPress Environment
- How to change the default location where new post gets stored?
- Redirect all URLs in WordPress and Permalink to by country to subdomain