Old version of websites showing with Azure - azure

I'm running into an issue where different versions of the site are showing up but it only seems to happen based on the URL you type in the address bar.
http://example.com -- shows correct version
http://www.example.com -- shows correct version
www.example.com -- shows old/wrong version
Thanks for any help in advance! It's becoming a nuisance and I can't tell if it's a DNS issue, or something wrong within the Azure web app.

This sounds like a DNS issue.
Are you using a third party service for your domain name? If that's the case, you likely haven't verified the "www" part with them.
Take a look at the guide here. You want to make sure that you have everything available:
Http
www
*

I fixed this by doing a couple things
First I had to add a CNAME record for www pointing to azuresitename.domain.com
Next I had to delete the bad folder out of /wwwroot/wp-content/cache/page_enhanced
After that, it was no longer showing the old/original version of the files.

Related

How does Firebase manage versions in Firebase Hosting?

Firebase hosting instantly makes available a new version of your website the moment you deploy it. At the same time, you are able to instantly roll back to a previous version. Usually a CDN requires several minutes before changes are propagated and the same applies for .htaccess files or similar that could do redirects making me think that they have a dynamic extra layer on top of the CDN. If they do, how might they handle the DNS stuff?
You have a custom domain name that uses a CNAME to reach Firebase's mysite.web.app and Firebase probably uses a CNAME to forward to Fastly's (Firebase's CDN provider based on a network lookup) domain e.g. firebase-customerid-mysite.fastlycdn.net
I can't exactly figure out how they deal with the instant version changes. They must use different folders in the CDN but I don't think they use a different subdomain for each version as that would require a new certificate etc and would not be so fast. So how do you redirect a whole domain to a subfolder? You could do that by changing the .htaccess file but that would also require several minutes. How do you think they do it?
Thanks in advance!
As far as I can sum it up firebase version change is similar to that of a git so no they don't create a different directory to deploy your latest version they just save the previous version in the .firebase or something folder (version control directory) and the subdomain doesn't change. Instead, the latest version gets deployed which changes we can see immediately due to no-cache which generally needs to be validated with the origin server before each reuse. So when the browser asks fastly, it checks with the firebase server if the resource has changed and if yes a new version of that resource is provided.
References:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
https://firebase.google.com/docs/remote-config/templates
https://docs.fastly.com/en/guides/how-fastlys-cdn-service-works
To achieve a similar result one can use git for version control (changes in real-time) and use the no-cache header (for resource validation). We can use any CDN as nearly all of them validate the resources.

I tried to setup Gitlab pages and it broke the VM?

I have been running a gitlab instance and today I was trying to setup the pages function. I followed the gitlab guides and google cloud docs, it seems my config file got corrupt or broke (by me ofc) and even the ssh was down (directly on google console) till I rebooted the VM. Now I'm able to see that the instance is working on the shell but can't get it back online, I have 3 options here, 1) I wait a day or so to see if this is a domain/dns issue, 2) keep trying to a recover the gitlab that only had 3 users and no projects, or 3) make a fresh one and try to setup everything well from the start. The only things bothering me is losing 2 users that came to my project organically.
What can I do here? I'm trying to fix the config file but at the same time I don't know if its a domain issue because I had to change some dns configs to set the subdomain. The only thing I cannot understand really is how or why did my shell went down for at least a hour after I changed the configurations for gitlab. And btw are snapshots the right way to make backups with gcloud ?
What can I do here?
Undo your changes; in other words, put things back they way they were before, when the system was working. To do that, you have to know exactly what you changed.
If you are not keeping your config file in version control, you should start to do that, as that will make it easier to track and control your changes.
I decided to answer my question since I know how this problem occurred and it may occur for others.
Conditions:
Have a Gitlab self hosted.
Try to setup DNS settings for Gitlab Pages and the URL stop
responding even if the Gitlab instance still runs on the machine.
Here we can see the problem was in the DNS setup.
In my case I setup different DNS cases in my DOMAIN service DNS settings. Instead this DNS setup have to be made in your HOST/SERVER side.
To properly make a Gitlab DNS:
the wildcard domain *.mydomain.com type A should be on the server config, in my case gcloud DNS. Find out the software you use for your main machine server config.
Its good practice to setup the domain and server without redirection and set the proper DNS on the DOMAIN settings. This way your domain will resolve the subdomains without need for redirection on the DOMAIN settings. Once you set a wildcard type A record you can or cannot make the subdomain as a CNAME example, subdomain.mydomain.com. or you can use a separate IP for the subdomain with a type A record.
In summary, when setting up Gitlab Pages DNS do not change your DOMAIN settings, change your SERVER DNS settings.

Node.js with IIS using IISNode. I need to make a DNS rule so the site is accessible from outside the server without modifying the hosts file

I currently have the same problem as described in this question question!
I can access my Node.js site only if i modify my own hosts file to have (serverIP) NameOfSite, but typing that into the url doesnt work.
In the comments under the ansewer to that question it says that the person fixed this issue by adding a rule in their DNS. How would you do that? I am googling how to make rules in DNS and its not getting me anywhere and im seeing a lot of sites about firewalls.

why subdomain on iis not working?

I am trying to add sub domain on local IIS and use this construction. i search in google and find many other article like this but it not work on my PC.
how can I resolve this problem?
It caused by my proxy. it was on and my DNS changes was not affected properly.
I disconnect my proxy (psiphon3 in my situation) an every thing work like a charm.

ReInstall Sitecore IIS can't resolve host (with ERR_NAME_NOT_RESOLVED)

I decided to reinstall Sitecore 8 instance via wizard, I have removed instance and install a new one with the same name XYZ.
but after reinstall it I am getting an error in browser - ERR_NAME_NOT_RESOLVED
I checked IIS binding, I checked hosts file, reset DNS, restart PC and etc I still get this error in any browsers.
How I can fix it? What is the issue?
I have found solution https://support.microsoft.com/en-us/kb/2823477 but I can't understend how sitecore installer can change it.
Generally, the process of site resolution goes in the following consequence:
DNS - find ip address by the hostname (from request header)
Access IIS with that IP (and port if not default 80)
IIS checks bindings by hostname from header and serves corresponding website.
Website being resolved has (merged) web.config in root folder. It has node with all sites served by current Sitecore instance, being listed. Order does matter! First successful match (by hostname or port or default) works it out.
Site being found on previous step has startItem property which is your Sitecore item served by dafault.
Please go and carefully check all those steps to see where it breaks. Also I have previously write a blog post, you may find it helpful with more details on that:
http://blog.martinmiles.net/post/how-websites-are-resolved-with-sitecore
Do any sites work with a Local name configured in 'hosts'?
You may need to disable the Loopback Check in your tcpip stack. Windows uses this as a countermeasure for man in the middle attacks by default on many systems. A registry change is needed to allow a machine to refer to itself using a name that is not its own Hostname. Sorry, but I can't remember the actual key.

Resources