Plain.ovh Logo

Documentation

Technical details and API reference

Overview

Plain.ovh is built with SvelteKit and deployed on Netlify. It uses serverless functions for URL analysis and shortlink management.

Features

  • URL Analysis: Follows redirects, cleans parameters, provides domain insights.
  • Shortlinks: Creates transparent short URLs with optional stats.
  • Domain Similarity: Compares domains against a list of known brands.
  • Privacy-First: No user data storage, aggregated stats only.

API Reference

Analyze URL

GET /api/analyze?url={encoded-url}

Analyzes a URL and returns redirect chain, cleaned URL, and insights.

Response

{
  "inputUrl": "https://example.com",
  "finalUrl": "https://example.com/clean",
  "hops": [
    {
      "url": "https://example.com",
      "status": 301,
      "kind": "destination"
    }
  ],
  "cleanUrl": "https://example.com/clean",
  "removedParams": ["utm_source"],
  "keptParams": ["tag"],
  "explanation": "Removed 1 tracking parameter(s). Kept affiliate/support parameters by default.",
  "insights": {
    "https": true,
    "domain": "example.com",
    "domainAge": {
      "registeredAt": "2020-01-01",
      "ageYears": 5,
      "source": "rdap"
    },
    "origin": {
      "country": "US",
      "source": "rdap"
    },
    "domainSimilarity": {
      "source": "default",
      "matches": [
        {
          "name": "Example Brand",
          "officialDomains": ["example.com"],
          "score": 1.0,
          "isOfficial": true,
          "reason": "Matches an official domain."
        }
      ]
    },
    "tech": ["Cloudflare"],
    "warnings": []
  }
}

Create Shortlink

POST /api/shorten

Creates a shortlink for the given destination URL.

Request Body

{
  "destinationUrl": "https://example.com",
  "slug": "optional-custom-slug"
}

Response

{
  "shortUrl": "https://plain.ovh/s/abc123"
}

Get Shortlink Stats

GET /api/stats?slug={slug}

Returns aggregated stats for a shortlink.

Response

{
  "slug": "abc123",
  "clickCount": 42,
  "countryTop": {
    "US": 20,
    "GB": 15
  }
}

Brand List (Admin)

GET /api/brands

Returns the current brand list for domain similarity.

POST /api/brands (requires Authorization: Bearer {token})

Updates the brand list. Token set via BRANDS_ADMIN_TOKEN env var.

Deployment

Plain.ovh uses Netlify for hosting:

  • Static site generation with SvelteKit adapter-netlify.
  • Serverless functions for API endpoints.
  • Optional Supabase for shortlink storage and brand list persistence.