humanmade / Mercator

WordPress multisite domain mapping for the modern era.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can this plugin handle www and non-www variants?

codecowboy opened this issue · comments

Ref this question: http://wordpress.stackexchange.com/questions/181914/what-is-the-correct-way-to-map-multiple-domains-in-a-wordpress-4-1-multisite-ins

Could Mercator handle mapping domains without the www ? I'm just looking for a way to have multisite recognise http://example.com AND http://www.example.com or is this really only possible with rewrites at the webserver level (.htaccess / nginx config)

@codecowboy this is a bad idea. you don't want example.com and www.example.com to both load the same content, or search engines will cut your SEO points in half, as your 2 domains will share SEO juice. The proper fix for this is to redirect one direction or the other. As a minimalist, I redirect www -> non-www with a full path follow and 301.

If you have some other use case, let me know!

FYI, Mercator treats with-www and no-www identically: example.com mapped to a site will make both www.example.com and example.com resolve to that site. However, WordPress will kick in afterwards with its canonical redirect functionality and automatically 301 redirect to whatever you have set for the mapping. If you want the www, have it in the mapping; if you don't, leave it out, and WP will handle directing you to the right one.