Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
08af82c
ci: add Azure Static Web Apps workflow file
davidop Apr 2, 2024
2f4a036
Update target framework versions and package references
davidop Apr 18, 2024
15988b6
Merge pull request #523 from davidop/feature/upgrade
fboucher Jun 3, 2024
401e84d
docs: update README.md [skip ci]
allcontributors[bot] Jun 3, 2024
1ce9bfb
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] Jun 3, 2024
7b11c71
Merge pull request #525 from microsoft/all-contributors/add-davidop
fboucher Jun 3, 2024
7a1d28b
This is version 4 (#549)
fboucher Mar 20, 2025
e1b4fe0
update badges
fboucher Mar 24, 2025
7aebf09
specify branch on build badges
fboucher Mar 24, 2025
5c8599e
cleaner badges look
fboucher Mar 24, 2025
3aaf67a
update doc for deployment and how to set api public
fboucher Mar 26, 2025
37f230c
Hotfix v4 0 1 (#557)
fboucher Mar 26, 2025
44d4c57
update documentation with new shorter path
fboucher Mar 26, 2025
6c1e688
delete empty file
fboucher Mar 26, 2025
fcb5b77
update the deployment process
fboucher Mar 26, 2025
55caf56
add devcontainer configuration for .NET development Aspire, azd, git,…
fboucher Mar 27, 2025
080ca0e
add step to clean up previous builds in GitHub Actions workflow
fboucher Apr 26, 2025
133288f
Version 4.1 (#569)
fboucher Apr 27, 2025
532f09d
Update packages and upgrade to .NET Aspire 9.3 (#573)
fboucher May 26, 2025
82f4ee7
Create issues-cleaner-bot.yml (#574)
fboucher May 29, 2025
b25407d
Merge branch 'microsoft:main' into upstream-merge-2025
lafleurh Jun 17, 2025
c1d8947
Fix packaging project
lafleurh Jun 17, 2025
fffa7fa
Remove old build GitHub action
lafleurh Jun 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,17 @@
"bug",
"code"
]
},
{
"login": "davidop",
"name": "David Oliva Paredes",
"avatar_url": "https://avatars.githubusercontent.com/u/7433346?v=4",
"profile": "https://davidop.code.blog/",
"contributions": [
"code"
]
}
],
"commitConvention": "angular"
"commitConvention": "angular",
"commitType": "docs"
}
34 changes: 34 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
{
"name": "C# (.NET)",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/dotnet:1-9.0-bookworm",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/dotnet:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/azure/azure-dev/azd:0": {},
"ghcr.io/dotnet/aspire-devcontainer-feature/dotnetaspire:1": {}
}

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [5000, 5001],
// "portsAttributes": {
// "5001": {
// "protocol": "https"
// }
// }

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "dotnet restore",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
1 change: 1 addition & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- @azure Rule - Use Azure Best Practices: When generating code for Azure, running terminal commands for Azure, or performing operations related to Azure, invoke your `azure_development-get_best_practices` tool if available.
22 changes: 22 additions & 0 deletions .github/issues-cleaner-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Close inactive issues
on:
schedule:
- cron: "30 1 * * *"

jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v9
with:
days-before-issue-stale: 60
days-before-issue-close: 28
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
days-before-pr-stale: -1
days-before-pr-close: -1
repo-token: ${{ secrets.GITHUB_TOKEN }}
45 changes: 0 additions & 45 deletions .github/workflows/azure-static-web-apps-purple-water-0f0178b0f.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build

on:
push:
branches:
- main
- v-next
pull_request:
branches:
- main
- v-next

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x' # Adjust the version as needed

- name: Clean up previous builds
run: dotnet clean src/AzUrlShortener.sln

- name: Install .NET Aspire workload
run: dotnet workload update && dotnet workload install aspire

- name: Restore dependencies
run: dotnet restore src/AzUrlShortener.sln

- name: Build solution
run: dotnet build src/AzUrlShortener.sln --no-restore --configuration Release
Binary file removed Media/AgreeToTerms.png
Binary file not shown.
Binary file removed Media/CustomDomain-AddDomainToAppService.png
Binary file not shown.
Binary file removed Media/CustomDomain-CreateAppSvcCert.png
Binary file not shown.
Binary file removed Media/CustomDomain-GoDaddyExample.png
Binary file not shown.
Binary file removed Media/CustomDomain-Green.png
Binary file not shown.
Binary file removed Media/CustomDomain-HealthyCert.png
Binary file not shown.
Binary file removed Media/CustomDomain-NotSecure-AddCert.png
Binary file not shown.
Binary file removed Media/CustomDomain-ProveOwnership.png
Binary file not shown.
Binary file removed Media/CustomDomain-TLS-SSLBindings.png
Binary file not shown.
Binary file removed Media/HowItWorks-Diagram.png
Binary file not shown.
Binary file removed Media/TBA-AccessKeys.png
Binary file not shown.
Binary file removed Media/TBA-BuildDetails.png
Binary file not shown.
Binary file removed Media/TBA-CICD.png
Binary file not shown.
Binary file removed Media/TBA-Configuration.png
Binary file not shown.
Binary file removed Media/TBA-CreateNewRepo.png
Binary file not shown.
Binary file removed Media/TBA-CreateSWA.png
Binary file not shown.
Binary file removed Media/TBA-CustomDomain.png
Binary file not shown.
Binary file removed Media/TBA-InviteAdmin.png
Binary file not shown.
Binary file removed Media/TBA-SourceControlDetails.png
Binary file not shown.
Binary file removed Media/TBA-UseThisTemplate.png
Binary file not shown.
Binary file removed Media/TBA-YourRepo.png
Binary file not shown.
Binary file removed Media/TinyBlazorAdmin.gif
Binary file not shown.
Binary file removed Media/UpdateUpgrade.png
Binary file not shown.
Binary file removed Media/UrlRedirection.gif
Binary file not shown.
Binary file removed Media/UrlShortener-API-URL.png
Binary file not shown.
Binary file removed Media/UrlShortener-CustomDeployment.png
Diff not rendered.
Binary file removed Media/UrlShortener-DeployedResources.png
Diff not rendered.
Binary file removed Media/bkgUrlShortener.png
Diff not rendered.
Binary file removed Media/tinyBA_home.png
Diff not rendered.
Binary file removed Media/tinyBA_stats.png
Diff not rendered.
Binary file removed Media/tinyBA_urls.png
Diff not rendered.
39 changes: 17 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Azure Url Shortener (AzUrlShortener)

[![Deploy to Azure](https://img.shields.io/badge/Deploy%20To-Azure-blue?logo=microsoft-azure)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fmicrosoft%2FAzUrlShortener%2Fmain%2Fsrc%2Fdeployment%2FazureDeploy.json)
[![Serverless Library](https://img.shields.io/badge/Serverless%20Library-%E2%9C%94%EF%B8%8Fyes-blue?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAACx1BMVEUAAAAAAAAAAP8Af38AVaoAf78AVaoAbbYAXLkAc7kAZqoAWqUAY7gAZrIAZa4AYKwAY7QAZ7YAZ7MAZ7UAZLMAY7MAZLUAZrIAZLcAY7QAZrIAZLMAZLYAZ7YAZLYAZrcAZbgAZLMAZ7YAZbIAZLQAYrMAY7UAZLUAZLYAZbQAZrcAZbMAZbgAZbQAZrQAZrgAZrcAZbgAaLkAZbUAZbYAZ7YAZbUAZrUAZ7YAZ7cAZbcAZrcAZ7cAZrcAZ7cAZrcAZrcAZbcAZ7YAZ7cAZrcAZrYAZrcAZbYAZrcAZ7cAZrYAZrcAZrcAZ7cAZ7gAZrcAZrcAZ7cAZ7gAZ7gBaLcCaLcDabgEaLYFabUGarQGa7oHarMIbLoKbbsMbrsOb7wPcLwQcb0Rcb0SbawTcr0Xdb4Ydb8Zdr8dc6UeecEfdKQgcqMhe8Eic6IkdqEkfcIndJ4of8MqeJ0rgcQsdpsseZwxhMY2eZQ3iMc7fZI7gJJBjstCfYxGkcxHkcxMh4hNlc5TmM9VioFVmtBYnNFZnNFbndFbntFcntFcntJdn9Jfh3lhodNiodNnpNVopdVsi3Bsp9Ztj3BulXFuqdZuqddwqtd0mG11mG12j2l7mml9kWWGn2KMlluUpVmWpliaqFWpoEeusEivokOz0uq31Ou51eu61uy7pju81+2/2O3BqDfB2u7C2u7C2+7DqTbD2+7EuTrF3O/F3e/G3e/H3e/H3u/ItTbKqzLKuzbL4PDOsjDOvTTW5vTb6vXdwyrgsyPg7ffitCLk7/jm8PjqyCLq8/ns9PrttxrwuBjxuBfyzB3zvBfzzBzz+Pz0uRb1uRX1+fz2+v33+v34+/35uxL5/P36/P77wxP70Bf7/f78yhT8yxT8zBX8zRX8zhX8zxb80Bb8/f79vA/9vQ/9vhD9vxD9wBH9whH9xBL9xhP9xxP9yBOZ2sNJAAAAU3RSTlMAAQECAwQGBwsLDxESFCMlKSovOz1AQkNHSFBRUVFUVVpbW11gYmRlZmdoaWlqbXByc3V5e36AgYOIubrBysvR09XX2drd3ub2+vv7/Pz8/f7+/mxm4TkAAAHCSURBVHgBXcz1U1VBHEDxr90d2N2KLYbYAbZwVAzB7g6xOxS7OzCwu8UQFVtEBUMxWFeeoX+Ee5e5bxg+v56ZI155itesX80nl6STpYJ/EI5uzUplShsKtwVGP4+LexEff7hlQfHy7YKxU6kkrZ+NI7CsG2pj3VLql9YbgZ5lxCraHRjJDKW+an2qzwgg0A6zdQSWvhm/V6nf+tXkWS/nAi0ymFILWJEY0fuuSv6hd8H21wuA0qa0hrXvVzJHqb/6egiwKWERNBfJBxtM4IBSKfpJTEzM8b7rExbTOadUZNunCOj3UH3+6fF49NuZsC5xOT7SaOv3VcBCZSXpPRir3y2rIk1vx4YBS/ZHRh5SynMuBCP0wbE64jfl8clQrC3q39MJGGFno4dXlcqEPzqRmi4kp6yx4XT0UIpJAZgWe3QgMPbjn4M2nLk6hB65RdrDpHtRJu34dn8YMOj85cHgLyJ1gTF3jvTnxod5Trh0xQTKmZIjABh1MXzil30Y86Oc0CazGCWDcOy+OQBXp0JiNcZxbTpe1SVVRr9gmLoZV1df8SoRwOxebuhQRNLIXq8dVnCrGlklnfyVGjZpUD6vuP4DQn3cxeG842QAAAAASUVORK5CYII=)](https://serverlesslibrary.net/sample/1c809aa2-2d4f-4fee-bc27-0c2c36844ac8)
![GitHub Release](https://img.shields.io/github/v/release/microsoft/AzUrlShortener) ![.NET](https://img.shields.io/badge/9.0-512BD4?logo=dotnet&logoColor=fff) [![Build](https://github.com/microsoft/AzUrlShortener/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/microsoft/AzUrlShortener/actions/workflows/build.yml) ![GitHub License](https://img.shields.io/github/license/microsoft/AzUrlShortener) [![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?&logo=discord&logoColor=white)](https://discord.gg/6zA3jKw)

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-22-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-23-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->


Expand All @@ -20,36 +20,36 @@ Features:
- Budget-friendly and 100% open-source.
- Extensible for more enterprise-friendly configurations
- Simple step by step deployment.


## How To Deploy

👉 **[Step by Step Deployment](https://github.com/microsoft/AzUrlShortener/wiki/How-to-deploy-your-AzUrlShortener)** (wiki pages) 👈 documentation is available here. If you would like to used the TinyBlazorAdmin as frontend (suggested) **you must first** follow the [steps to follow for TinyBlazorAdmin](https://github.com/microsoft/AzUrlShortener/wiki/How-to-deploy-TinyBlazorAdmin).
👉 **[Step by Step Deployment](doc/how-to-deploy.md)** 👈 documentation is available here.

If you want to **Update** or **Upgrade**, please refer to [this page](https://github.com/microsoft/AzUrlShortener/wiki/How-to-Update---Upgrade) (wiki pages).
If you want to **Update** or **Upgrade**, please refer to [the faq page](doc/faq.md).

## How To Use It

AzUrlShortener is an API that doesn't have any admin UI by default. There are many different ways to manage your Short Urls, from a direct HTTP call to a fancy website.
Once deployed, use the admin webApp (aka TinyBlazorAdmin) to create new short URLs.

We suggest [Tiny Blazor Admin](./src/Cloud5mins.ShortenerTools.TinyBlazorAdmin/README.md); it's a static website.
![Tiny Blazor Admin looks](images/tinyblazyadmin-tour.gif)

![Tiny Blazor Admin looks](/Media/TinyBlazorAdmin.gif)

By default, without any specific Admin tool, you can use an API client like [Postman](https://www.postman.com/) or a plugin to VSCode like [REST Client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client). We've included simple API calls via a postman collection and environment [here](./src/tools).
### Alternative Admin Tool

You can also directly update the tables in storage using [Azure Storage Explorer](https://github.com/microsoft/AzUrlShortener/wiki/How-to-Use-Azure-Storage-Explorer-as-Admin-Tools-for-AzUrlShortener).
By default, all the required resources are deployed into Azure. However you can decide to run the [API](src/Cloud5mins.ShortenerTools.Api/) locally, in a container or somewhere else. You can than use an API client like [Postman](https://www.postman.com/) or a plugin to VSCode like [REST Client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client), to manage your URLs. We've included simple API calls via a postman collection and environment [here](./src/tools/).

---
You can also directly update the tables in storage using [Azure Storage Explorer](doc/how-to-use-azure-storage-explorer.md).

## How It Works
---

If you are interested to learn more about what's under the hood, and get more details on each Azure Function, read the [How it works](https://github.com/microsoft/AzUrlShortener/wiki/how-it-works) page.
## Videos

There is also a videos that explains a bit how things works and does a quick tour of the project.

| Cloud 5 Mins | Azure Friday |
| --- | --- |
| [![Tiny Blazor Admin looks](/Media/AzUrlShortener_preview.gif)](https://youtu.be/fzXy2D77WMM) | [![Azure Friday](/Media/AzureFriday_preview.gif)](https://learn.microsoft.com/en-us/shows/azure-friday/azurlshortener-an-open-source-budget-friendly-url-shortener) |
| [![Tiny Blazor Admin looks](images/AzUrlShortener_preview.gif)](https://youtu.be/fzXy2D77WMM) | [![Azure Friday](/images/AzureFriday_preview.gif)](https://learn.microsoft.com/en-us/shows/azure-friday/azurlshortener-an-open-source-budget-friendly-url-shortener) |


---
Expand All @@ -59,10 +59,9 @@ There is also a videos that explains a bit how things works and does a quick tou

We are always trying to make it better. See the [AzUrlShortener project](https://github.com/users/FBoucher/projects/6/views/4) page and [issues](https://github.com/microsoft/AzUrlShortener/issues) to see the current progress.

You are invited to go into the [Discussion](https://github.com/microsoft/AzUrlShortener/discussions) tab to share your feedback, ask question, and suggest new feature!
You are invited to go into the [Discussion](https://github.com/microsoft/AzUrlShortener/discussions) tab to share your feedback, ask question, and suggest new feature! Or have look at our [faq](doc/faq.md) page for more information.

Current Backlog contains:
- A deployment option with everything combined into TinyBlazorAdmin
- More Statistics
- QR Code
- More tracking information (like Country)
Expand Down Expand Up @@ -116,6 +115,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ddematheu2"><img src="https://avatars.githubusercontent.com/u/43075365?v=4?s=100" width="100px;" alt="ddematheu2"/><br /><sub><b>ddematheu2</b></sub></a><br /><a href="https://github.com/microsoft/AzUrlShortener/issues?q=author%3Addematheu2" title="Bug reports">🐛</a> <a href="https://github.com/microsoft/AzUrlShortener/commits?author=ddematheu2" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://davidop.code.blog/"><img src="https://avatars.githubusercontent.com/u/7433346?v=4?s=100" width="100px;" alt="David Oliva Paredes"/><br /><sub><b>David Oliva Paredes</b></sub></a><br /><a href="https://github.com/microsoft/AzUrlShortener/commits?author=davidop" title="Code">💻</a></td>
</tr>
</tbody>
</table>
Expand All @@ -132,9 +132,4 @@ This project follows the [all-contributors](https://github.com/all-contributors/
> This project was inspired by a project created by [Jeremy Likness](https://github.com/JeremyLikness) that you can find here [jlik.me](https://github.com/JeremyLikness/jlik.me).


[UrlShortener]: https://github.com/microsoft/AzUrlShortener/raw/main/Media/UrlShortener_600.png
[ThumbnailYTAzUrlShortener_EN]: https://github.com/microsoft/AzUrlShortener/raw/main/Media/ThumbnailYTAzUrlShortener_EN.png
[glo]: https://github.com/microsoft/AzUrlShortener/raw/main/Media/glo-board_screenshot.png
[AzFunctionGitSync]: https://github.com/microsoft/AzUrlShortener/raw/main/Media/AzFunctionGitSync.png


[UrlShortener]: images/UrlShortener_600.png
38 changes: 38 additions & 0 deletions doc/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Frequently asked questions (f.a.q.)

- [How to Add a Custom Domain](./how-to-add-custom-domain.md)
- [Add authentication to the admin website](./how-to-deploy.md#add-authentication-to-the-admin-website)
- [Add a custom domain to the admin website](./how-to-add-custom-domain.md#add-a-custom-domain-to-the-admin-website)
- [How to migrate your data](./how-to-migrate-data.md)
- [How to deploy your AzUrlShortener](./how-to-deploy.md)
- [How to run AzUrlShortener locally](#how-to-run-azurlshortener-locally)
- [How to update/ redeploy AzUrlShortener](#update-redeploy-azurlshortener)
- [How does it work?](./how-it-works.md)
- [Security Considerations](./security-considerations.md)
- [How to make the api public](./how-to-set-api-public.md)


## How to run AzUrlShortener locally

You will need .NET 9, Docker or Podman installed on your machine. From the `scr` directory, run the following command `dotnet run --project AppHost`. You can also open the solution in Visual Studio or Visual studio Code and use F5, make sure the `Cloud5mins.ShortenerTools.AppHost` project is set as starting project.


## Update/ redeploy AzUrlShortener

In a terminal, navigate to the `src` directory of your project.

```bash
cd src
```

To avoid affecting custom domains when deploying Azure Container Apps use the following command.

```bash
azd config set alpha.aca.persistDomains on
```

If you haven't already, log in to your Azure account with azd auth login. You can re-deploy the application with the following command:

```bash
azd up
```
39 changes: 39 additions & 0 deletions doc/how-it-works.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
How It Works
============

The backend is using Azure Functions and Azure Table Storable this page will explains how they work together in this tool.

![Global Diagram](../images/global_diagram_idea_v3b.jpg)

## Azure Functions

Azure Functions were the perfect match for this project because when you use a dynamic plan you are charged only when the function is running. In our case, it's only a few seconds at the time. To know more read [Azure Function Pricing](https://azure.microsoft.com/en-us/pricing/details/functions/)

### Function: UrlRedirect

This function returns a HTTP Redirect to the URL. You can call it directly doing an HTTP request of type POST or GET passing the vanity at the end of the URL. The Azure Function Proxy will call Function passing the parameter.

For example, if the domain is *c5m.ca* and the vanity is "project", the request `c5m.ca/2w` will call "UrlRedirect/{shortUrl}" where `shortUrl` is equal to "project". end the result will be a redirect to the long URL save in the storage.

Every time the Azure Function is called it will increment the click count and save the timestamp when this call appends.

## Azure Table Storage

The [Azure table storage](https://docs.microsoft.com/en-us/azure/storage/tables/) are the data store in this project. They are a very convenient service to keep structured NoSQL data in the cloud. They are also typically lower in cost than traditional SQL for similar volumes of data.

You can explore the Azure Table storage from Azure portal or using the [Azure Storage Explorer](https://docs.microsoft.com/en-us/azure/vs-azure-tools-storage-manage-with-storage-explorer?tabs=windows#overview) it's a nice free tool that is available on all platforms (MacOS, Linux, Windows).

There are two tables that will be automatically created at the first call.

### Table: ClickStats

The ClickStats table get a new entry at every call of the Azure Function **UrlRedirect** with the Datetime value.


### Table: UrlDetails

The UrlDetails table has the information about all the URLs created. The Vanity, URL, and number of clicks.

## Security Considerations

Review [Security Considerations](./security-considerations.md) and choose and implement an appropriate authorization approach.
15 changes: 15 additions & 0 deletions doc/how-to-add-custom-domain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# How to Add a Custom Domain

From the Azure Portal, Open the Azure COntainer Apps named `azfunc-light`. This is the one doing the redirect, this is where you want yout custom domain to be used.

From the left menu, select **Custom domains** and click on **Add custom domain**.

![Add custom domain](../images/add-custom-domain.png)

Follow the instructions to add your custom domain. Note that it may takes a few minutes for the domain to all be setup. Once it is, you should see the domain listed in the custom domains list withthe green check mark.


## Add a custom domain to the admin website

To make it easier to find the TinyBlazorAdmin website, you can also add a custom domain to it. From your Domain provider (GoDaddy, NameCheap, etc.), you can set a forwarding subdomain to the admin website. For example, if you want to use `admin.yourdomain.com`, you can set a forwarding rule to the URL of the admin website (e.g., `https://admin-azfunc-light.azurecontainerapps.io`). This way, you can access the TinyBlazorAdmin website using your custom domain.

Loading