Subdomains
Create and manage subdomains under your parent domain for organization and delegation.
What are Subdomains?
Subdomains allow you to create hierarchical names under a domain you own. If you own alice.x1, you can create:
pay.alice.x1nft.alice.x1dao.alice.x1api.alice.x1
Subdomain Structure
subdomain.parent.tld
│ │ │
│ │ └─ Top-Level Domain (.x1, .xnt, .xen)
│ └──────── Parent Domain (must own)
└──────────────── Subdomain NameCreating Subdomains
Requirements
- Own the parent domain - You must own
alice.x1to createpay.alice.x1 - Parent domain must be active - Cannot be deleted or expired
- Unique subdomain name - Cannot already exist
Cost
- Creation Fee: ~0.002 XNT (for rent exemption)
- No ongoing fees - Permanent like regular domains
Using the Web Interface
- Visit x1ns.xyz/profile
- Select your domain
- Click “Create Subdomain”
- Enter subdomain name
- Set owner address (can be different from parent owner)
- Confirm transaction
Using the SDK
import { createSubdomain } from '@x1ns/sdk'
import { Connection } from '@solana/web3.js'
const connection = new Connection('https://rpc.mainnet.x1.xyz')
const signature = await createSubdomain(
connection,
wallet, // Your wallet
'pay.alice.x1', // Full subdomain name
recipientAddress, // Owner of subdomain
'mainnet'
)Use Cases
1. Payment Addresses
Create dedicated payment subdomains:
pay.company.x1 - General payments
invoice.company.x1 - Invoice payments
tip.creator.x1 - Tips and donations2. Team Members
Assign subdomains to team members:
alice.dao.x1
bob.dao.x1
charlie.dao.x13. Services & Apps
Organize services:
api.service.x1
app.service.x1
admin.service.x14. NFT Collections
Track collections:
genesis.collection.x1
rare.collection.x1
common.collection.x15. Geographic Regions
Regional addresses:
us.company.x1
eu.company.x1
asia.company.x1Subdomain Features
What You Can Do
- ✅ Create unlimited subdomains
- ✅ Set different owner for each subdomain
- ✅ Resolve like regular domains
- ✅ Update subdomain records
- ✅ Transfer subdomain ownership
- ✅ Delete subdomains
Current Limitations
- ❌ Cannot tokenize subdomains as NFTs (yet)
- ❌ Cannot sell subdomains on marketplace (yet)
- ❌ Cannot set subdomain as primary domain (yet)
- ❌ Cannot create sub-subdomains (yet)
Managing Subdomains
Viewing Subdomains
On the Profile page, you’ll see all subdomains under your parent domain.
Transferring Subdomain
// Transfer subdomain to new owner
const instruction = await transferSubdomainInstruction(
wallet.publicKey,
'pay.alice.x1',
newOwnerAddress
)Deleting Subdomain
Only the subdomain owner can delete it:
- Navigate to subdomain in your profile
- Click “Delete Subdomain”
- Confirm transaction
- Rent is reclaimed
Resolution
Subdomains resolve independently:
// Resolve subdomain
const owner = await resolveDomain(
connection,
'pay.alice.x1',
'mainnet'
)
// Returns: owner of the subdomain (may differ from parent owner)Security Considerations
Access Control
- Parent domain owner can always create subdomains
- Parent domain owner cannot modify existing subdomains
- Subdomain owner has full control over their subdomain
- Transfer parent domain does NOT transfer subdomains
Best Practices
- Document your subdomain structure
- Use descriptive names for clarity
- Set appropriate owners for delegation
- Monitor subdomain usage
- Backup subdomain owner keys
Pricing
Subdomains have minimal cost since they don’t require registration:
| Action | Cost |
|---|---|
| Create Subdomain | ~0.002 XNT |
| Transfer Subdomain | ~0.001 XNT |
| Delete Subdomain | ~0.001 XNT |
| Update Records | ~0.001 XNT |
API Reference
For developers integrating subdomains:
- SDK Reference - TypeScript SDK
- API Reference - REST API
- Smart Contracts - Contract details
Examples
Organization Structure
company.x1
├── pay.company.x1 (Payments)
├── support.company.x1 (Customer Support)
├── team.company.x1 (Internal)
└── api.company.x1 (API Endpoint)Creator Setup
creator.x1
├── tip.creator.x1 (Tips)
├── nft.creator.x1 (NFT Sales)
├── merch.creator.x1 (Merchandise)
└── community.creator.x1 (Community)Roadmap
Future subdomain features:
- 🔜 NFT tokenization
- 🔜 Marketplace trading
- 🔜 Primary domain support
- 🔜 Sub-subdomain support
- 🔜 Bulk subdomain creation
Next Steps
- Create Your First Subdomain - Get started
- SDK Integration - Build with subdomains
- API Documentation - REST API