Help

Some helpful tips you should know about using 2static.it:

  • Depending on the server software you use for hosting your site (Apache, IIS, etc), different set up steps are necessary to make your server respond properly to requests coming via your sub-domain alias (http://something.2static.it). In general, what you need to do is to set up "something.2static.it" as an alias for "mydomain.tld". In Apache, this is done by simply adding a "ServerAlias" record and specifying "something.2static.it". Consult your server software or hosting documentation for questions on how to properly set up a "server alias" for your site.

    For specific help/suggestions if you are unsure or unable to set up your Server Alias, check out this Server Alias guide.

  • Despite the temptation to do so when testing your new alias, it is strongly advised that you do not attempt to actually pull up just your sub-domain alias (http://something.2static.it) in a browser. The request will resolve to the root of your site as expected, but it is also likely that in doing so, whatever server or script processes are in place for setting cookies on your site will set a cookie on that alias sub-domain. You will then be unable to see or measure any performance benefits in your browser (unless you clear those cookies), as all requests for any assets via that URL will now be saddled with the unnecessary cookie(s), defeating the whole purpose of using 2static.it!

    NOTE: Even if you do load a page or asset via your sub-domain alias that sets a cookie in your browser, this will only affect your browser and not any of your site's other visitors. Make sure though you never expose or allow your visitors to load any pages or resources that set cookies via your sub-domain alias -- only static, cookie-free assets should be loaded, to maintain the performance benefits.

    You can and should however test that your sub-domain alias is set up correctly by attempting to load one of your cookie-free static assets in a browser via your alias, such as http://something.2static.it/images/logo.png. If you are able to load the resource (in this case, an image) properly, then you have verified that your sub-domain alias is properly set up and ready for use on your site. And because you loaded a static asset that doesn't set a cookie, your sub-domain alias remains free and clear of any pesky cookies.

  • The service currently only works with non-secure (http://) pages. This is because for a secure (https://) page, all resources must be loaded via the https:// protocol to avoid mixed-content warnings from the browser. While technically you could reference your sub-domain alias securely (https://something.2static.it) and it would still resolve to your site's IP properly, your server will not have a valid SSL certificate installed for "something.2static.it", and so the browser will complain about an invalid certificate on any resources you try to load via the secure https:// version of your sub-domain alias.

    For the time being, the best workaround is to use your 2static.it sub-domain alias for only non-secure pages, and load resources either relatively or via your own secure domain for secure pages. The unfortunate downside is that asset loading on your secure pages will not benefit from the cookie-shielding that 2static.it provides.

    However, in the future, 2static.it plans to offer the ability to purchase an SSL certificate for your sub-domain alias, which will resolve this issue, allowing you to use the service even with your secure pages. Check back soon.