Future-Proofing Domain Name (Zone Apex / WWW.), DNS, for WordPress MultiSite, & CDN!


My 1st post here, and an honor it is too - I've been following Expert Exchange since my early web design days back in 2003.

Brief Introduction

I work as a web developer for a UK charity. We're aiming to in-house web production and using affordable hosting appropriate to our requirements (Fully managed VPS), and based on WordPress MultiSite (WPMS) mainly to reduce production costs.

The purpose of this post is to allow me to reach a conclusion regarding future-proofing our Domain Name in light of various conditions, which I've been trying to reconcile. My reconciling has been concerned with research and testing installations, and learning thereafter.

My Ideal Scenario

That we use https://www.mydomain.org.uk for WordPress MultiSite.
HTTPS://WWW. as default Canonical URL, site-wide.
Use a cdn-mydomain2 .org.uk OR subdomain.mydomain.org.uk for static content.
If and when the website's visitor numbers increases, migrate over to one of those CDN...
Be considerate of our future Microsoft Dynamics CRM requirements form integrating elements and other objects, possibly via a 3rd party integration services too, and API.

And most importantly:

The setup must be self-sustaining, and as stable for my non-web-dev-colleagues. Less complex is GOOD. Using cPanel level services is preferred, such as CF Plus, or MAX+W3T

Yes WWW!

I've been greatly influenced by the http://www.yes-www.org/why-use-www/ - especially the 4th paragraph, given that Dynamics CRM architecture application service provider models: http://msdn.microsoft.com/en-gb/library/bb928229.aspx.

The 'Problem'

1. WordPress MultiSite Naked Domains vs. WWW. CNAME options

WordPress MultiSite recommends changing the SiteURL to mydomain.org.uk; meaning: http[s]://mydomain.org.uk.

My recent tests of setting https://www. as the SiteURL, Domain, Home during WPMS activation resulted in the need to use .HTACCESS to force WWW. Otherwise, any attempt to access https://mydomain.org.uk/sample-page resulted in a redirect to https://www.mydomain.org.uk.

Typical account of this issue can be seen here: http://stackoverflow.com/questions/3525994/links-with-www-in-wordpress-redirect-to-home-page.

My Issue

I don't have access to httpd.config to set the default (Canonical) URL. I DON'T want to use .htaccess to force (redirect to) https://www. The neatest way therefore is to activate WPMS using the naked domain, https://mydomain.org.uk.

WordPress' Core obviously handles the automatic correction of the URL when WWW. is NOT used, i.e. redirect https://www. to https://. But it's unable to correctly redirect https://www. without .htaccess.

Also, another issue or consideration is that WordPress can update .htaccess, just as various WordPress plugins can. Using .htaccess seems like a precarious option.

I want https://www. in WordPress MultiSite without using .htaccess to force (and correctly redirect) URLS to WWW. when WWW. is omitted.

My Question

1. A solution not using .htaccess?

I don't want to mess-about with WordPress Core. The only solution I've seen repeated everywhere across the web is: .htaccess 301 permanent redirect.  Are my, and possibly everyone else, missing a more stable method for using https://www. for WPMS?

Would the .htaccess be acceptable? Assuming I use the .htaccess solution, I would need to keep-an-eye-on the .htaccess at crucial times, such as installing W3T-Cache, for example, or when installing anything that updates .htaccess?


Is installing WordPress MultiSite using http[s]://www. irrelevant as far as those points outlined in YES-WWW are concerned?

2. Would WWW. be more stable, future-proof, more 'compliant', and flexible?

If YES-WWW is to be believed, which I think it should, does using WWW. as permanent Canonical Domain Name make more sense for the reasons pointed out above? (My Ideal Scenario).

My Options

1. Install WPMS using HTTPS://WWW .MYDOMAIN and force WWW. using .HTACCESS in order to preserve URLs accessed without WWW, e.g. from external websites, social networks ...

2. Install WPMS using HTTPS://MYDOMAIN, and NOT force WWW. and hope that this won't limit any future application level developments or integrations. YES-WWW, I'm sorry!.

DNS Considerations

I would rather be free to use CNAME for WWW. whenever required. Does the YES-WWW belief merit using .htaccess to force WWW. in WordPress MultiSite (WPMS)?

What problems might I encounter if I force WWW. using .htaccess?

I understand that mydomain.org.uk must be: mydomain.org.uk -- IN -- A -- IP#. Similarly, using CNAME here would override other records.

My DNS Record, considerations

Correct me if I'm wrong, some CDNs & cloud/app services, especially provided through Hosting Providers (aka Partners), require: www.mydomain.org.uk. -- 1400 -- IN -- CNAME   www.mydomain.org.uk.cdn.CDN-NAME.com, in other words, some CDNs will only work through a domain using WWW.

However, some CDNs allow the use of naked domain names, but this demand updating Name Servers & DNS Zone File to point to whichever CDN selected. I prefer simplicity! But, we won't need a global CDN to begin with, just FEO and a DIY Static CDN

Please see attached, FYI, my DNS record from WHM.

Any advice would be gratefully received.

I hope this information is clear, please feel free to point out any misinformation.
Dylan ThomasAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jason C. LevineDon't talk to me.Commented:
What, in two sentences or less, is your question?
There is no reason to use www if you don't want to, if you want to use it then use it.
It's all personal preference, nothing's going to ever change, both will always work as the www. bit is just a subdomain the same as any subdomain you may have like downloads.mysite.com or fr.mysite.com

And that www-yes site is blah.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dylan ThomasAuthor Commented:
My solution:

Actually, the above bumf is me emptying my head! Sorry about that.

The solution is simple, don't use WordPress MultiSite. Seriously.

My question:

So my question was, Jason - (you're quite right), well - there is no question now that I've realized I shouldn't use WPMS, just plain old WordPress.

Jason: My concern was the technical implications of making https:// the default URL, especially in relation to CDN, APIs, application service providers... and implications for DNS? (as per YES WWW)

Gary, there are practical implications to the blah. I won't specify source, but:

Why should you redirect your URLs to www.

To use the CDN service fully and to always have your website served from the closest location to your visitors your website always has to redirect to WWW URLs. If your website cannot be accessed through www we strongly recommend that you reconfigure it.

This CDN is via a Partner... Having a CDN via a Partner is easier to setup and manage.

... you can use a naked domain with CF. If you activate through a CF hosting partner, the www CNAME is required because of DNS RFC compliance issues.

As I have found, MultiSite doesn't redirect properly when www. is used in SiteURL, and needs .htaccess to redirect NO-WWW URLS to the correct page, rather than the hompage!

Thanks for your replies, btw.
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

Whether your site uses www or not should have no bearing on the CDN - it's not your site accessing the CDN, its the visitors browser - all the CNAME does is tell the DNS servers where to look
www has no bearing on the visitors location

From CF's own site (and not sitepoint.com)
Yes, you can use a naked domain with CloudFlare. If you activate through a CloudFlare hosting partner, the www CNAME is required because of DNS RFC compliance issues. If you prefer not to use www on your site, then you can add the domain directly to CloudFlare.
Dylan ThomasAuthor Commented:
OK, I do see. Thanks Gary.

Just to clarify:

add the domain directly to CloudFlare.

... means configuring DNS within CloudFlare directly, not via a Partner. Having CF served & configured by a Partner (i.e. cPanel admin) is less-complicated for me and also for my colleagues, with all due respect to them.

I'll mark this as answered, both. https://www. will be the SiteURL after all.

Strange trip. Anwyay.

Sincerely, thanks.
Dylan ThomasAuthor Commented:
Jason helped me wake up, and Gary made me realize my concerns weren't true. Didn't need a graphical explanation of DNS, or CNAME. The solution was something I realized having written out the problem as per my original post..
Should only take 5 mins to set up and not that complicated
Dylan ThomasAuthor Commented:
That's very useful.

The new website will be low UV per month for sure. Keen to see what would work best to start with, static.subdomain with Cloud storage, FEO, caching, but also looking at: 'Why we don’t use a CDN: A story about SPDY and SSL' https://thethemefoundry.com/blog/why-we-dont-use-a-cdn-spdy-ssl/.
I had similar results, I used Amazon AWS for several months, they even have one of their distribution nodes a few miles from me.  They were consistently slower than just serving the content myself and sometimes by a lot (as in seconds which is a lot when I look at the microseconds it takes for something to arrive)
But with a large geographically spread userbase a CDN still makes more sense.
Dylan ThomasAuthor Commented:
I'll test crasstalk info on a testing domain. Updating NS is all it takes after all.

I think must do testing all grades and flavors. If Europe is too far, it will be interesting to see the results.

I Just have to look at top client lists of these CDNs to appreciate the large userbase consideration too.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.