Fast, simple, and cost conscious link redirects on Azure
This project provides a simple Azure hosted URL redirect service.
A user opens the main web address and creates a new redirect by entering:
- A custom alias
- A target URL
After a successful submission, the user receives a redirect URL such as https://go.example.com/my-alias.
Anyone who opens that redirect URL is sent to the configured target URL through a fast and cost conscious redirect path.
- Provide a public landing page under
/ui - Restrict redirect creation to authenticated administrators under
/admin - Support custom aliases
- Validate alias and target URL input
- Return the final redirect URL immediately after creation
- Resolve redirects efficiently for public traffic
- Keep infrastructure simple and low cost by default
The solution is built from a small set of Azure services:
- 🌐 ASP.NET frontend hosted as an Azure Web App for the public
/uilanding page and protected/adminconsole - ⚡ Azure Functions for redirect lookup
- 🗂️ Azure Table Storage for low cost persistence of alias and target URL mappings
- 🚪 Azure Front Door as an optional edge entry point for unified routing in production
- 🔐 Microsoft Entra ID for administrator authentication and authorization
flowchart LR
A["User opens go.example.com"] --> B["Azure Front Door redirects to /ui"]
B --> C["ASP.NET frontend in Azure Web App"]
C --> D["Admin signs in at /admin with Entra ID"]
D --> E["Admin enters custom alias and target URL"]
E --> F["Basic validation runs in the frontend and backend"]
F --> G["Protected create API stores alias mapping"]
G --> H["Azure Table Storage persists redirect"]
G --> I["Admin receives redirect URL"]
J["Visitor opens go.example.com/alias"] --> K["Azure Front Door"]
K --> L["Redirect lookup function resolves alias"]
L --> M["Azure Table Storage lookup"]
L --> N["HTTP redirect to target URL"]
flowchart TB
FD["Azure Front Door"]
WEB["Azure Web App frontend"]
FUNC["Azure Functions"]
TABLE["Azure Table Storage"]
TARGET["Target destination URL"]
FD --> WEB
FD --> FUNC
WEB --> TABLE
FUNC --> TABLE
FUNC --> TARGET
- The user opens the root web address.
- Azure Front Door redirects
/to/ui. - An administrator signs in through Microsoft Entra ID.
- The protected admin page shows a form with alias and target URL fields.
- Basic validation checks that the alias is allowed and that the target is a valid URL.
- The protected backend stores the redirect definition.
- The system returns the final redirect URL to the administrator.
- A visitor opens the redirect URL at
/{alias}. - In local or server-hosted runs, the ASP.NET web host can resolve
/{alias}directly against the shared repository. - In the target Azure deployment, Azure Front Door can send
/ui,/admin,/ui/assets/*, and/api/*to the Web App, and the remaining root paths to redirect lookup. - Azure Functions resolves the alias from Table Storage.
- The platform returns the redirect response to the visitor.
- Table Storage is the default persistence layer because the data model is simple and cost sensitive.
- Azurite is the standard local development path so the app uses the real Table Storage code path without requiring Azure resources.
- Front Door improves latency and reduces backend load for frequently used links.
- The create UI lives under
/uiso alias routes can stay clean at the root hostname. - The admin console lives under
/adminand is protected by Microsoft Entra ID plus the app'sAdminOnlypolicy. - Durable Functions are not required for the initial scope.
- V1 contract: docs/v1-contract.md
- Local development with Azurite: docs/local-development.md
- Azure deployment with Bicep: docs/azure-deployment.md
- Microsoft Entra ID admin auth: docs/entra-auth.md
- Infrastructure validation script: infra/validate-infra.ps1
- Infrastructure validation script for macOS/Linux: infra/validate-infra.sh
This first version focuses on redirect creation and fast redirect delivery.
The following items are intentionally out of scope for the initial implementation:
- Advanced analytics
- Bulk import
- Complex user management
- Approval workflows
- Scheduled background processes unless a later requirement needs them
| Area | Choice |
|---|---|
| Frontend | ASP.NET in Azure Web App |
| Backend | ASP.NET Web App + Azure Functions |
| Storage | Azure Table Storage |
| Edge | Azure Front Door optional |
| Goal | Fast redirects at low cost |