Piwik not tracking on www - cdn

I have a website that uses CDN. The 'www' is on CDN, while the normal website http://example.com can be directly accessed from the webserver. The CDN(http://www.example.com) uses origin pull to get content from http://example.com
Now, when I access http://example.com directly, I can see entries in Piwik, however, it's not working when I access http://www.example.com. Is there something extra that I should be doing here?
Please note that the piwik is not hosted on the same server. I guess the server issue is not a problem, as it works when accessed directly (http://example.com)
I am using the technique which doesn't reveal the Piwik Server URL. (http://piwik.org/faq/how-to/#faq_132)
Thanks.

You need to add both example.com and www.example.com to URLs in your Websites Management on piwik side.

Check with Firebug to see if the request is made to Piwik on your www. ?

Related

browser insecure content warning, no http:// in db or WP theme

The browser says a client-managed site is insecure. If I check in Firefox > Media, I can see no files delivered over http://.
If I check https://www.whynopadlock.com/results/11d3f0c2-a944-43c0-922a-92a0cbe7b5c2 it says there are 3 image files delivered over http://
http://www.vivescoal.com.au/wp-content/uploads/2017/06/logo.png
http://www.vivescoal.com.au/wp-content/themes/balance/images/button_icon.png
http://www.vivescoal.com.au/wp-content/themes/balance/images/dark_backgrounds/background9.jpg
I can't find these URLs in the database, nor in the parent theme or child theme.
Help appreciated to see where in the site these files are being called.
Since I cannot add images to comment, I'm adding it here. This is what I see is happening:
The image is called from a different domain, then redirected with a 301 to the non-https version. There is either something wrong in the litespeed configuration or the webserver configuration of that domain. It should not be redirecting https to http.

Redirect subdomain.example.com to example.com in firebase web hosting, but keep the URL intact

I have hosted https://example.com on firebase web hosting
Now, I would like https://subdomain.example.com to go the https://example.com hosted site, but URL should be intact and still show https://subdomain.example.com.
I will handle the UI on Web Pages based on the subdomain name and hence retaining subdomain is very important.
If I use 'redirect to existing domain' option, then URL is changed. Is there any configuration which allows me to do this on firebase?
Website is built using AngularIO, so any suggestion as part of Angular deployment is also welcome.
While there are similar questions on the site, I couldn't find any solution. So, asking here again with more clear description. Thanks for your help.
Just connect subdomain.example.com but don't set it as a redirect. All domains/subdomains connected to a project that are not redirects will resolve the same content.

CloudFront + CloudFlare + Wordpress getting 302 redirects

I just implemented CloudFront with Wordpress using W3TC. But none of my images are using the CDN. On checking Pingdom report I found that there is a redirection happening where CloudFront redirects back to my website.
Remove the following redirect chain if possible:
https://cdn.fashioncrab.com/wp-content/uploads/2016/05/secure-footer-widget1.png
https://www.fashioncrab.com/wp-content/uploads/2016/05/secure-footer-widget1.png
Here is the PingDom report https://tools.pingdom.com/#!/vDTT0/https://www.fashioncrab.com/
How to fix this so that my images are called from CloudFront instead of my server.
Note: I have made the CNAME record for cdn.fashioncrab.com in CloudFlare if that helps...
So finally I am able to resolve it myself.
Here is what I did:
Got rid of CloudFlare. Surprisingly, the site is much faster without CloudFlare
Removed "Enable 301 .htaccess redirect" option from Really simple SSL wordpress plugin
got a Free SSL certificate issued for the CloudFront distribution from AWS
Now everything is working as it should.

Safari redirection adding comma causing 404

I have a website running in Nginx and Cloudflare. It has several url checks and redirection. For example, when use hits example.com, they will be redirected to example.com/en/, these are done in nginx. In Chrome and Firefox they all work fine, but in Safari, when I hit example.com, it becomes:
http://example.com/en/,%20http://example.com/en/
This is causing 404. Any suggestions?.
This definitely wouldn't be coming from CloudFlare's side unless you've manually created a PageRule to redirect content on your site. If you haven't manually created a PageRule at CloudFlare though you can rule out that as the location/cause of the issue.
If you have created a PageRule at CloudFlare to redirect content I'd suggest opening a support ticket directly with CloudFlare so our support team can review your specific account settings.
p.s. I work at CloudFlare.

IN google tag manager setup page domain should be with www, without or both?

IN google tag manager setup page domain should be with www, without or both?
Depends on your site!
All the domains are there for are to help provide default values/suggestions etc later on when you are setting up your containers - as far as I am aware it doesn't have any functional effect on your container and are optional.
Some sites will be set up to automatically redirect users from www.domain.com to domain.com, or domain.com to www.domain.com etc. If your site does this then enter that URL appropriately, otherwise I'd personally opt for including the www.

Resources