Get a domain name, DNS and SSL certificate for free

    Hello, Habr. This post is intended for lovers of freebies and contains a ready-made recipe for obtaining a domain name, DNS server services and SSL certificate with a cost of 0 rubles 0 kopecks. Free cheese happens only in a mousetrap and this is true, so the recipe is more likely for those who want a beautiful link to their personal small project with https support and not for serious projects.

    Domain name

    We go to the site , immediately drive the desired name there and click check availability => checkout if the desired name is available. Then we register and go to your personal account where we see our domain names.



    We find the desired name, go to Nameserver and register Yandex DNS there.



    DNS server

    Next, go here and add the just created domain name.


    We see that “Failed to find the domain in DNS”, wait until Yandex finds it.


    After that, we confirm ownership of the domain by adding the corresponding CNAME record as written in the detailed Yandex instructions. Then we wait until Yandex finds the record it needs and confirms the ownership of the domain. It may take quite some time.




    After that, we see the long-awaited inscription that the domain is connected and delegated to Yandex DNS.


    Next, go to the DNS Editor and add an A - record linking the domain name to the ip - address of your server.


    It may take quite a while before this A - record takes effect. Let's start something locally (after all, we registered the server address and see how our domain resolves. Works!


    That's all with the DNS server, now let's get an ssl certificate and provide access to our server via https (security above all).

    SSL certificate

    We go to , register, select Validations Wizard => Domain Validation (for SSL certificate) , enter our domain


    And there we are offered to prove that we own the domain using e-mail, select any one that we like, create it in Yandex. We send a letter there, take the code from there and prove that the domain belongs to us.




    Then we go to Certificates Wizard => Web Server SSL / TLS Certificate , specify our domain, generate and paste the key and click submit


    The key can be generated for example like this
    mkdir ./certificates
    mkdir ./certificates/
    cd ./certificates/
    openssl genrsa -out ./ 2048
    openssl req -new -sha256 -key ./ -out ./
    cat ./

    Certificate received! Download the archive


    Unpack and copy the key files to the nginx directory

    cp ~/Downloads/ /usr/local/etc/nginx/
    cp ./ /usr/local/etc/nginx/
    nano /usr/local/etc/nginx/nginx.conf

    A little we straighten a config Restart nginx

    server {
    listen 8080;
    ssl on;
    server_name localhost;
    ssl_certificate /usr/local/etc/nginx/;
    ssl_certificate_key /usr/local/etc/nginx/;

    nginx -s stop

    We open our page using https ... and everything works!


    We got a domain name, DNS server services and a confirmed SSL certificate without paying a dime to anyone, and it’s completely legal. To launch our ultra-mega-gig service, it remains only to raise the VPS and deploy our program there. Alas, today a free VPS is too good and unrealistic; you still have to pay with bloody dollars from your pocket for a VPS server. Nevertheless, all have a good weekend and I hope the note will be useful to someone.

    Also popular now: