# How to Register a Free Domain with DigitalPlat FreeDomain: Complete Technical Guide

> Register a free domain with DigitalPlat FreeDomain. Follow our technical guide to complete the form, pass Cloudflare Turnstile, and submit your request for a free domain.

- Repository: [DigitalPlat Foundation/FreeDomain](https://github.com/DigitalPlatDev/FreeDomain)
- Tags: how-to-guide
- Published: 2026-02-25

---

**To register a free domain with DigitalPlat FreeDomain, navigate to the registration endpoint, complete the HTML form with validated contact details, pass the Cloudflare Turnstile challenge, and submit the POST request to `/auth/register` to receive your allocated domain.**

DigitalPlat FreeDomain is an open-source domain registration platform maintained in the `DigitalPlatDev/FreeDomain` repository. The registration workflow combines a static HTML frontend with client-side validation and a backend endpoint that processes account creation and domain allocation. This guide explains the complete technical flow from form submission to WHOIS verification.

## Understanding the Registration Architecture

The registration system consists of three primary layers: a Tailwind CSS-styled HTML form, JavaScript validation logic, and a server-side endpoint that consumes form data.

### Frontend Components in register.html

The main registration interface lives in [`opensource/frontend/register.html`](https://github.com/DigitalPlatDev/FreeDomain/blob/main/opensource/frontend/register.html). This static file contains the complete form markup that collects user identity data and contact information required for domain WHOIS records.

The form uses standard HTML5 input types with Tailwind CSS utility classes for styling and posts to the `/auth/register` endpoint using the `application/x-www-form-urlencoded` content type.

### Client-Side Validation Logic

Embedded JavaScript in [`opensource/frontend/register.html`](https://github.com/DigitalPlatDev/FreeDomain/blob/main/opensource/frontend/register.html) (lines 97-108) enforces data integrity before submission. The validation function checks field lengths, pattern matching, and password complexity in real-time, disabling the submit button until all criteria pass.

This prevents malformed requests from reaching the server and provides immediate feedback to users.

### Backend Endpoint Contract

While the Python/Flask backend implementation is not included in the open-source repository, the expected API contract is documented through the frontend code and tutorial files. The server expects a POST request to `/auth/register` containing the form fields, validates the Cloudflare Turnstile token, creates the user account, and allocates a free domain from the available pool.

## Step-by-Step Registration Process

Follow these steps to complete your free domain registration:

1. **Navigate to the registration page** at `https://dash.domain.digitalplat.org/auth/register` as documented in [`documents/tutorial/getting-started/1.1-register-account.md`](https://github.com/DigitalPlatDev/FreeDomain/blob/main/documents/tutorial/getting-started/1.1-register-account.md).

2. **Enter your account details** in the HTML form fields: username (5-50 characters, no spaces), full legal name (must include a space), email address, phone number in international format (+X-XXXXXXXXXX), and physical address (minimum 20 characters with at least two commas).

3. **Set your security credentials** by entering a password that meets complexity requirements: minimum 8 characters, at least one uppercase letter, one lowercase letter, one number, and no special characters including `&`, `*`, `'`, `"`, `<`, `>`, `\`, `/`, or spaces.

4. **Complete the Cloudflare Turnstile challenge** rendered in the captcha container to verify you are not a bot.

5. **Submit the registration** once the JavaScript validation enables the Register button. The browser sends a POST request to `/auth/register` with your form data.

6. **Access your dashboard** upon successful creation. The server redirects you to the overview page where your allocated free domain (e.g., `yourdomain.digitalplat.org`) is displayed.

## Technical Implementation Details

### HTML Form Structure

The minimal markup required to replicate the registration interface:

```html
<form id="registerForm" action="/auth/register" method="POST" class="space-y-6">
  <input type="text" name="username" id="username" placeholder="Username" required class="input-field">
  <input type="text" name="fullname" id="fullname" placeholder="Your Name" required class="input-field">
  <input type="email" name="email" id="email" placeholder="example@nic.us.kg" required class="input-field">
  <input type="text" name="phone" id="phone" placeholder="+X-XXXXXXXXXX" required class="input-field">
  <textarea name="address" id="address" placeholder="1000 Santa Monica Blvd, …" required class="input-field"></textarea>
  <input type="password" name="password" id="password" placeholder="Password" required class="input-field">
  <input type="password" name="confirmPassword" id="confirmPassword" placeholder="Confirm Password" required class="input-field">
  <div class="g-recaptcha mb-2" data-sitekey="{{ sitekey }}"></div>
  <button type="submit" id="registerButton" class="btn-primary w-full disabled:opacity-50 disabled:cursor-not-allowed" disabled>Register</button>
</form>

```

### JavaScript Validation Rules

The validation logic from [`opensource/frontend/register.html`](https://github.com/DigitalPlatDev/FreeDomain/blob/main/opensource/frontend/register.html) enforces these specific constraints:

```javascript
function validateForm() {
  let isValid = true;

  // Username: 5-50 chars, no spaces
  if (usernameInput.value.length < 5 || usernameInput.value.length > 50 || /\s/.test(usernameInput.value)) {
    document.getElementById('usernameError').innerText = 'Username must be 5-50 characters, no spaces.';
    isValid = false;
  } else {
    document.getElementById('usernameError').innerText = '';
  }

  // Full name: must contain a space, ≤50 chars
  if (!fullnameInput.value.includes(' ') || fullnameInput.value.length > 50) {
    document.getElementById('fullnameError').innerText = 'Enter a legal full name (first + last).';
    isValid = false;
  } else {
    document.getElementById('fullnameError').innerText = '';
  }

  // Phone: +<country-code>-<digits> (≥4 digits)
  const phoneRegex = /^\+\d{1,3}-\d{4,}$/;
  if (!phoneRegex.test(phoneInput.value) || phoneInput.value.length > 50) {
    document.getElementById('phoneError').innerText = 'Phone must be in format +X-XXXXXXXXXX.';
    isValid = false;
  }

  // Address: ≥20 chars, ≥2 commas, English alphanum only
  const addressRegex = /^[A-Za-z0-9\s,]*$/;
  if (addressInput.value.length < 20 || (addressInput.value.match(/,/g)||[]).length < 2 || !addressRegex.test(addressInput.value)) {
    document.getElementById('addressError').innerText = 'Address must be ≥20 chars, contain 2 commas, English only.';
    isValid = false;
  }

  // Password: ≥8 chars, mixed case, number, no disallowed symbols, ≤128 chars
  const passwordRequirements = [
    { regex: /.{8,}/, message: 'at least 8 characters' },
    { regex: /[A-Z]/, message: 'an uppercase letter' },
    { regex: /[a-z]/, message: 'a lowercase letter' },
    { regex: /\d/, message: 'a number' },
    { regex: /^[^\&\*\'\"<>\\\/\s]*$/, message: 'no &, *, \', ", <, >, \\, /, or spaces' }
  ];
  
  // Check all requirements and set isValid accordingly
  registerButton.disabled = !isValid;
}

```

### API Request Format

For automation or testing, you can submit the registration data via `curl`:

```bash
curl -X POST https://dash.domain.digitalplat.org/auth/register \
  -d "username=johndoe" \
  -d "fullname=John Doe" \
  -d "email=john@example.com" \
  -d "phone=+1-5551234567" \
  -d "address=123 Main St, Springfield, IL, 62704" \
  -d "password=StrongP@ssw0rd!" \
  -d "confirmPassword=StrongP@ssw0rd!" \
  -H "Content-Type: application/x-www-form-urlencoded"

```

> **Note**: The Turnstile token must be obtained from the client side; in a pure `curl` test you can temporarily disable captcha verification on the server for debugging.

## Post-Registration Verification

After successfully submitting the form to register a free domain with DigitalPlat FreeDomain, you can verify your domain allocation using the built-in WHOIS server.

### WHOIS Lookup

DigitalPlat runs a minimal WHOIS socket server implemented in [`opensource/whois_server/whois.py`](https://github.com/DigitalPlatDev/FreeDomain/blob/main/opensource/whois_server/whois.py). To query your newly registered domain:

```bash
whois -h 0.0.0.0 -p 43 yourdomain.digitalplat.org

```

Or using Python sockets:

```python
import socket

s = socket.create_connection(('0.0.0.0', 43))
s.sendall(b'yourdomain.digitalplat.org\r\n')
print(s.recv(4096).decode())
s.close()

```

The WHOIS server returns public contact data associated with your domain, confirming successful registration in the DigitalPlat system.

## Summary

- **DigitalPlat FreeDomain** provides a complete open-source domain registration workflow through the `DigitalPlatDev/FreeDomain` repository.
- The registration interface resides in [`opensource/frontend/register.html`](https://github.com/DigitalPlatDev/FreeDomain/blob/main/opensource/frontend/register.html), featuring Tailwind CSS styling and Cloudflare Turnstile protection.
- **Client-side validation** enforces strict rules for username length, password complexity, phone format (+X-XXXXXXXXXX), and address formatting before enabling the submit button.
- The form submits to `/auth/register` via POST with `application/x-www-form-urlencoded` data, creating the account and allocating a free domain from the pool.
- Post-registration verification is available through the Python-based WHOIS server in [`opensource/whois_server/whois.py`](https://github.com/DigitalPlatDev/FreeDomain/blob/main/opensource/whois_server/whois.py).

## Frequently Asked Questions

### What are the password requirements for DigitalPlat FreeDomain registration?

Passwords must be at least 8 characters and no more than 128 characters, containing at least one uppercase letter, one lowercase letter, and one number. They cannot contain spaces or the special characters `&`, `*`, `'`, `"`, `<`, `>`, `\`, or `/`. These constraints are enforced by the JavaScript validation logic in [`opensource/frontend/register.html`](https://github.com/DigitalPlatDev/FreeDomain/blob/main/opensource/frontend/register.html) before the form submits to the server.

### How does the phone number validation work in the registration form?

The phone number must follow the international format `+<country-code>-<digits>` with at least 4 digits after the hyphen (for example, `+1-5551234567`). The validation regex `/^\+\d{1,3}-\d{4,}$/` in the client-side script ensures the format matches E.164-style notation while remaining under 50 characters total length.

### Can I automate domain registration using the API instead of the web interface?

Yes, you can submit registration data programmatically by sending a POST request to `https://dash.domain.digitalplat.org/auth/register` with `application/x-www-form-urlencoded` data containing all required fields: `username`, `fullname`, `email`, `phone`, `address`, `password`, and `confirmPassword`. However, you must handle the Cloudflare Turnstile token generation client-side or temporarily disable captcha verification in a development environment, as the production endpoint requires valid captcha verification.

### Where can I verify that my domain was successfully registered after completing the process?

After registration, you can verify your domain using the built-in WHOIS server implemented in [`opensource/whois_server/whois.py`](https://github.com/DigitalPlatDev/FreeDomain/blob/main/opensource/whois_server/whois.py). Query the server on port 43 using the command `whois -h 0.0.0.0 -p 43 yourdomain.digitalplat.org` or connect via Python sockets to retrieve the public registration data confirming your domain allocation in the DigitalPlat system.