<!-- Generated from llms-txt-angular/index.html. The canonical document is the HTML page. -->

- [ Home ](/) 
/
- [ How to create llms.txt ](/how-to-create/) 
/
- Angular            
# llms.txt in Angular

Serving llms.txt from an Angular app takes one file in the public/ folder, no configuration.

Last updated: July 26, 2026

## Where the file goes

Since Angular 17, the CLI scaffolds a `public/` folder at the project root. Everything
inside it is copied verbatim to the build output root, so a file at `public/llms.txt` is
served at `https://yourdomain.com/llms.txt` with no extra configuration.

## Method: the public/ folder

- Create the folder if it does not exist: `mkdir -p public` 
- Add the file: `touch public/llms.txt` 
- Write your content (see the [how-to guide](/how-to-create/) and [generator](/generator/) for the format):   
```
# Your Site Name

> One-sentence description of your site for LLM context.

## Core pages

- [Page title](https://yourdomain.com/page/): brief description.
- [Another page](https://yourdomain.com/other/): brief description.

```

- Build and deploy: `ng build`. The file lands at the output root.     
✓ Reference it at the root

Always link to  /llms.txt , never  /public/llms.txt . The  public/ 
segment is stripped at build time.

## Older projects (assets array)

Angular projects created before v17 use `src/assets/` plus the `assets` array
in
`angular.json`. Files there are served under `/assets/`, not the root,
which is the wrong location for `llms.txt`. The cleanest fix is to add a `public/` folder and ensure it is listed in the `assets` array (newer CLI configs include it by
default):

```
// angular.json (build options)
"assets": [
{ "glob": "**/*", "input": "public" }
]

```

This copies `public/llms.txt` to the output root, served at `/llms.txt`.

## Verifying the setup

After deploying, open `https://yourdomain.com/llms.txt` in a browser. It should load as
plain text. You can also confirm the content type from the terminal:

```
curl -sI https://yourdomain.com/llms.txt | grep -i content-type
# expect: content-type: text/plain
```

Next: keep the file in sync with your real pages, and consider a fuller
[`llms-full.txt`](/llms-full-txt/). Not sure the format is right? Run it
through the
[validator](/validator/). See also the [Vercel](/llms-txt-vercel/) and
[Netlify](/llms-txt-netlify/) guides for host-specific notes.

## Sources

- [ Angular docs, project file structure (public/) ](https://angular.dev/reference/configs/file-structure)
- [ llmstxt.org, spec reference ](https://llmstxt.org/)           
On this page

- [ Where the file goes ](#overview)
- [ Method: the public/ folder ](#public)
- [ Older projects (assets array) ](#older)
- [ Verifying the setup ](#verify)
