HabrSeptember 4, 2026🇷🇺Translated from Russian

Secure Custom Domain Setup for Client Status Pages Using CNAME, Certbot and Go Instead of ACME On-Demand

A monitoring service needed to offer public status pages on customer domains for white-label use by web studios. Clients add a CNAME record pointing their subdomain to the service endpoint, after which the platform must serve the page over HTTPS with a valid certificate.

The team rejected ACME on-demand solutions such as Caddy or OpenResty auto-SSL for three reasons. Private keys would reside inside the application process or require an additional stateful component. Any attacker could point arbitrary domains at the IP and trigger Let's Encrypt issuance, exhausting the 300-order rate limit per account. Issuing certificates during the TLS handshake also imposes latency on the first visitor and risks connection drops if the CA is unreachable.

Instead, domains are stored in the database when users enter them in settings. A four-stage pipeline handles the rest: input normalization and validation in Go, periodic DNS verification by a background goroutine, certificate issuance and nginx configuration by a privileged helper script, and request routing inside the application.

Validation rejects empty strings only when removing a domain, blocks the service's own domains to prevent takeover of internal pages, and requires Punycode for internationalized names so users see exactly what they must configure at their registrar. After saving, the domain enters pending status.

The DNS verifier runs every five minutes. It first checks for a matching CNAME and falls back to comparing A records for apex domains where CNAME is prohibited by RFC. Temporary DNS failures do not downgrade an already verified or active domain; only a warning is recorded. This hysteresis avoids random outages for customers whose pages are already live.

A systemd-timer script running as root queries the application over loopback, runs certbot with the webroot challenge, writes per-domain nginx server blocks from a template, and notifies the application when a domain becomes active. Certificates for removed domains are left untouched and simply expire naturally. The script always validates input with a regex and runs nginx -t before reloading.

Inside the Go application a HostRouter middleware maps verified custom hosts to the corresponding status page while returning 404 for all other paths, preventing exposure of dashboards or APIs. Internal endpoints used by the helper are protected by checking for the absence of X-Forwarded-For and X-Real-IP headers in addition to loopback address validation.

The scheme works well for hundreds of domains on a single server. It avoids rate-limit exhaustion because issuance occurs only after confirmed DNS ownership, keeps certificate handling outside the application, and ensures that failure of any single component does not affect already-active customer pages.

Related articles

HabrOther

Deploying Self-Hosted Hysteria 2 Proxy on Debian-Based Linux VPS via Terminal

A detailed guide explains how to set up a personal Hysteria 2 proxy server on a KVM VPS running Debian or Ubuntu without any web panels. The process begins with generating ed25519 SSH keys, hardening the sshd_config file, and restricting access with ufw to only TCP port 22 and UDP port 443. Hysteria 2 is downloaded from GitHub, made executable, and configured using a TOML file that enables salamander obfuscation and a self-signed TLS certificate. A custom systemd unit ensures the service restarts on failure. The client configuration includes SHA256 pinning of the server certificate to prevent MITM attacks. The guide emphasizes manual CLI operations that apply equally to other services such as Nginx and stresses checking local laws before deployment.

AntiMalwareOther

Rostec Scales PCAT Platform Nationwide as Russia's First Industrial Marketplace

Rostec has expanded its PCAT platform to every organization within the state corporation that manufactures civilian products. Operating since 2025 and upgraded in September 2026, the platform now unites more than 180 enterprises and research organizations. Its catalog contains over 1,250 finished products along with 370 technological and manufacturing competencies. Visitors can locate not only equipment and components but also partners able to design, test, or produce required solutions. The portal receives more than 23,000 weekly visits, 60 percent of them from corporations and large enterprises. Rostec is extending the network into the regions through supply-chain agreements already signed with Krasnodar Krai and the oblasts of Tver, Tula, and Ryazan. In parallel the corporation launched the Robot Management System in November 2025 for centralized control of robots, sensors, and related IT services.

AntiMalwareOther

Kate Mobile Loses VK API Access After New Request Limits Exhaust Quota in 1.5 Days

Popular third-party Android client Kate Mobile has been cut off from VK services following the introduction of strict monthly API request caps. VK implemented the new limits on September 7, offering verified partners up to 100 million requests per month while requiring payment for additional access by third-party services. Kate Mobile developers had requested pricing details in advance but received no response from VK. Calculations showed that the app's real user base would consume the entire 100-million-request allowance in roughly 36 hours, with the messages.send method alone generating twice the allowed volume. Caching optimizations cannot mitigate the issue because message sending cannot be cached. Developers view the change as an effort to eliminate alternative clients rather than a genuine monetization strategy. Users expressed disappointment, praising the app's long-term support and criticizing the official VK client for excessive features and advertising.

AntiMalwareOther

Russian AI Research Ranks High in Global Science but Struggles with Commercialization

Russia has secured third place among BRICS nations and twentieth worldwide in the number of scientific papers presented at ten leading international conferences on machine learning and artificial intelligence. According to a study by the Scientometric Center of HSE University, Russian organizations contributed 560 papers between 2020 and 2025 that received over 12,300 citations. The average international citation rate reached 3.59, surpassing India despite fewer total publications. Russian strengths are most evident in the mathematics of machine learning, optimization, and formal concept analysis, with notable results also in computer vision and speech technologies. More than 40 percent of domestic publications involve business participation, led by Yandex among companies, HSE University and Skoltech among universities, and AIRI among non-profit organizations. Significant barriers remain, including shortages of computing power, limited access to high-quality data, and weak transfer of research into commercial products, particularly in natural language processing, AI agents, and infrastructure technologies. The Ministry of Digital Development has announced plans to stimulate demand for domestic AI solutions, expand computing infrastructure, improve regulation, and accelerate the implementation of scientific developments.