Website review
This review may include AI-generated content and is not individually verified. Domain, certificate and other facts come from the observed data on this page.
What is Codeberg Pages?
Codeberg Pages is a free static-site hosting service tied to Codeberg, a Git hosting platform. You put plain HTML, CSS, images, fonts and other static files into a repository, and Codeberg serves them at a URL like https://USERNAME.codeberg.page/REPOSITORY. It is aimed at open-source project homepages, developer blogs and small web experiments rather than database-backed applications.
How it works, in practice
There are two deployment routes:
- Manual/static files: Create a public repository with a branch named
pages, add a Forgejo webhook pointing at your site URL, and push your files. The branch filter should bepages. - With a static site generator: If you use Jekyll, Hugo or a similar tool, you can build and deploy through Forgejo Actions. The documentation covers that workflow.
If your repository is itself named pages, the repository name is dropped from the URL, giving you the main subdomain.
Custom domains
Codeberg Pages supports custom domains through DNS records: a CNAME to codeberg.page, or an ALIAS record for apex domains. Where ALIAS is unavailable, the alternative is A and AAAA records plus a TXT record. You also need a TXT record on the _git-pages-repository subdomain containing your repository's Git HTTPS clone URL, which authorizes the Pages server to deploy it.
Who it suits
- A maintainer who wants a project homepage without paying for separate hosting.
- A developer who wants a blog generated by Hugo or Jekyll and deployed on every push.
- Someone experimenting with static HTML who only needs a public URL.
Trade-offs to weigh
Because it serves static files only, anything needing server-side code, a database or dynamic forms is out of scope. The setup is more manual than some hosted alternatives: you configure branches and webhooks yourself, and custom domains require several DNS records. On the other hand, it keeps your site next to your source code and fits naturally into a Git-based workflow.
A useful next step
If you already have a Codeberg repository, decide first whether you will build the site with a generator or upload finished files. That choice determines whether you configure Forgejo Actions or a plain webhook. For a broader look at the platform hosting the repositories, see Codeberg.
How do I set up a static website on Codeberg Pages without using CI?
Create a public repository with a pages branch, add a webhook pointing to your Codeberg Pages URL, then push your static files. No CI or build step is involved.
Steps
- Create the repository and branch. Either make a public repo named
pageswith a branch calledpages(this serves at your main subdomain), or add apagesbranch to any public repo:git switch --orphan pages git rm --cached -r . - Add the deployment webhook. In the repo's Settings → Webhooks, click Add webhook, choose Forgejo as the type, set the Target URL to your site address, set the Branch filter to
pages, and save. The target ishttps://USERNAME.codeberg.page/REPOSITORY(drop/REPOSITORYif the repo is namedpages). - Push your files. HTML, CSS, fonts and images go on the
pagesbranch and appear at that URL.
Custom domain
- Add
CNAME codeberg.page.for subdomains, orALIAS codeberg.page.for apex domains. - If ALIAS isn't supported, use
A 217.197.84.141andAAAA 2a0a:4580:103f:c0de::2. - Add a TXT record on
_git-pages-repositorycontaining your repo's Git HTTPS clone URL to authorize deployment.
When to choose this over CI
| Webhook only | With CI | |
|---|---|---|
| Best for | Hand-written HTML, pre-built output | Jekyll, Hugo, other generators |
| Build step | None | Runs in Forgejo Actions |
| Effort | One-time webhook setup | Workflow file plus config |
If your source files are already the final site, the webhook path is simpler. If a generator transforms Markdown or templates into HTML, use the CI route instead — see the Codeberg Pages documentation linked from Codeberg Pages.
A practical next step: confirm your target URL resolves before pushing, since the webhook fires on every push to pages and a wrong URL silently sends deployments nowhere.
How do I configure a custom domain for my Codeberg Pages site?
You configure a custom domain by pointing DNS at Codeberg Pages and then authorizing the server to deploy your repository to that domain. The exact DNS records depend on whether you use a subdomain or an apex domain.
DNS records to add
| Your domain type | Record to add | Value |
|---|---|---|
Subdomain (e.g. www.example.com, blog.example.com) |
CNAME |
codeberg.page. |
| Apex domain where CNAME is not allowed | ALIAS |
codeberg.page. |
| Apex domain where ALIAS is not supported | A and AAAA |
217.197.84.141 and 2a0a:4580:103f:c0de::2 |
If you fall back to A/AAAA, also add the TXT record described below.
Authorize the deployment
Add a TXT record on the subdomain _git-pages-repository whose value is the Git HTTPS clone URL of your repository, in the form https://codeberg.org/user/repo.git. This tells the Codeberg Pages server it may deploy that repository to your domain.
Connect the repository side
In your repository's Settings → Webhooks, add a webhook of type Forgejo, set the target URL to your site URL, and set the branch filter to pages. When you don't have a custom domain, that URL is https://USERNAME.codeberg.page/REPOSITORY (omit REPOSITORY if the repository is itself named pages). With a custom domain, use the domain you just configured. Push your static files to the pages branch and they are served.
A practical decision path
If you are setting up a project homepage, a subdomain like docs.example.com is the simplest case: one CNAME record plus the TXT authorization. Choose an apex domain only if you specifically need the bare domain to serve the site, since that is where the ALIAS or A/AAAA fallback and the extra TXT record come in.
One thing to verify before you start: the TXT value must match your repository's actual clone URL, including the .git suffix, or deployment authorization will not line up. If DNS changes seem to have no effect, check that record first.
Can I use a static site generator like Hugo or Jekyll with Codeberg Pages?
Yes. Codeberg Pages is built to serve static output, and the page explicitly names Jekyll and Hugo as examples of generators you can pair with it. The generator runs in the build pipeline, not on the hosting side: you generate HTML, CSS, and assets, then publish the result to the pages branch.
Two ways to deploy a generated site
| Approach | How it works | Best for |
|---|---|---|
| CI build | A Forgejo Actions workflow runs your generator and deploys the built site | Hugo, Jekyll, or any generator with a CLI; sites that change often |
| No CI | You build locally, push the finished files, and a webhook deploys changes | Hand-written static files, or simple generators you prefer to run yourself |
The webhook route is the manual option: add a Forgejo webhook in your repository settings, point the Target URL at your site address, and set the branch filter to pages. Every push to that branch then triggers deployment.
What to watch for
Codeberg Pages serves static files only. Anything requiring a server runtime — server-side includes, PHP, database queries, or on-demand rendering — won't work, so generators that pre-render everything are the right fit and dynamic frameworks are not. The URL pattern is https://USERNAME.codeberg.page/REPOSITORY, and a repository literally named pages drops the repository segment. Custom domains are supported through DNS records, with CNAME or ALIAS for the usual cases and A/AAAA records as a fallback for apex domains.
A practical starting point
If you use Hugo or Jekyll, start with the CI route: create a public repository with a pages branch, add a Forgejo Actions workflow that builds the site and publishes the output, and push. Verify the built public/ or _site/ directory ends up on the branch rather than your source files — that's the most common mistake. If you'd rather not maintain a workflow, build locally and use the webhook instead.
For setup details, see the Codeberg Pages documentation at Codeberg Pages. If you're weighing hosts, GitHub Pages offers a comparable static workflow, though its build tooling and configuration differ.
What are the differences between using a repository named 'pages' and a branch named 'pages'?
A repository named pages and a branch named pages are two different ways to publish the same kind of static site. The repository name controls the URL path; the branch name is what triggers deployment.
Repository named pages: The site is served at the main subdomain, https://USERNAME.codeberg.page/, with no repository segment in the URL. This is the cleaner option when the site is the main point of your account, such as a personal homepage or project landing page.
Branch named pages in any public repository: The site is served at https://USERNAME.codeberg.page/REPOSITORY, where REPOSITORY is the repository name. This is better when you want several separate sites under one account, or when the site is tied to a specific project rather than your whole profile.
| Setup | Resulting URL | Best for |
|---|---|---|
Public repository named pages, branch pages |
https://USERNAME.codeberg.page/ |
A main site or profile homepage |
Branch pages in a public repository |
https://USERNAME.codeberg.page/REPOSITORY |
Project-specific sites, multiple sites per account |
The mechanics are otherwise the same: you put static files on the pages branch and configure a Forgejo webhook so changes deploy. If you use a static site generator such as Jekyll or Hugo, the documentation describes integrating deployment into a Forgejo Actions workflow instead of relying on the webhook alone.
A practical way to decide: if you want the shortest possible address and only one site, create the repository named pages. If you expect to host more than one site, or the site belongs to a named project, use a pages branch and accept the extra path segment. For a custom domain, the DNS and TXT authorization steps are the same either way, so the choice is mainly about the default URL and how you organize repositories.
Is Codeberg Pages free to use and what are its limitations?
Yes, Codeberg Pages is free to use. It is described as a way to host static websites "quick, easy, free & fast" by placing a site in a Git repository on Codeberg, which then serves it.
What it is good for
- Open source project homepages — a natural fit if your code already lives on Codeberg.
- Developer blogs and static sites — works with generators like Jekyll or Hugo.
- Web experiments and hand-written HTML — plain files can be pushed and served.
Main limitations to plan around
- Static content only. It serves files such as HTML, CSS, fonts, and images. Anything requiring a server-side runtime, database, or dynamic backend is outside its scope.
- Repository and branch naming rules. A public repository named
pageswith a branch calledpagesis the setup for the main subdomain; otherwise apagesbranch in a public repository is used, served under a repository path. - Deployment setup is manual. Without a CI workflow, you configure a Forgejo webhook pointing at your site URL, with the branch filter set to
pages. With a generator, deployment is integrated into a Forgejo Actions workflow instead. - Custom domains need DNS work. You add a CNAME to
codeberg.page, or an ALIAS for apex domains, or A/AAAA records, plus a TXT record at_git-pages-repositorycontaining your repository's Git HTTPS clone URL to authorize deployment. - Public repositories are required for the described setup, so it suits projects that are meant to be public.
Choosing between the two setup paths
| Situation | Path | What you do |
|---|---|---|
| You use Jekyll, Hugo or similar | With CI | Integrate deployment into a Forgejo Actions workflow that builds the site |
| You push plain static files by hand | Without CI | Add a Forgejo webhook with the target URL and branch filter pages |
A practical next step: decide whether your site is generated or hand-made, then follow the matching setup path. If you expect to need logins, form processing, or a database, plan to host those parts elsewhere and keep Codeberg Pages for the static front end.
User reviews (0)