Solved

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

Posted on 2014-10-11
10
355 Views
Last Modified: 2014-11-12
Hello

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?

UPDATE: ADDED QUESTION

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.
WebHost-Manager.png
0
Comment
Question by:Dylan Thomas
  • 5
  • 4
10 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 40375183
What, in two sentences or less, is your question?
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40375193
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.
0
 

Author Comment

by:Dylan Thomas
ID: 40375256
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.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40375258
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.
0
 

Author Comment

by:Dylan Thomas
ID: 40375261
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.
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Closing Comment

by:Dylan Thomas
ID: 40375265
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..
0
 
LVL 58

Expert Comment

by:Gary
ID: 40375266
Should only take 5 mins to set up and not that complicated
http://crasstalk.com/2013/05/how-to-enable-cloudflare-for-sub-domains-and-non-www-domains/
0
 

Author Comment

by:Dylan Thomas
ID: 40375272
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/.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40375274
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.
0
 

Author Comment

by:Dylan Thomas
ID: 40375290
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.

Interesting.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Hello to you all, I hear of many people congratulate AWS (Amazon Web Services) on how easy it is to spin up and create new EC2 (Elastic Compute Cloud) instances, but then fail and struggle to connect to them using simple tools such as SSH (Secure…
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now