Cite a Website in BibTeX
Standard BibTeX has no entry type for websites. Use @misc with the URL in howpublished, or @online if you work with biblatex.
On this page
Which entry type to use
The standard BibTeX styles (plain, abbrv, alpha, unsrt) were written in the 1980s and know neither a website type nor a url field. The entry that works with every style is @misc with the address in howpublished. If you use biblatex, or a style that defines it, @online is the cleaner choice.
Cite the website only if the web page itself is your source. A journal article you happened to read online is still an @article, and a PDF report is a @techreport.
The portable solution: @misc
A minimal entry:
@misc{ctan-bibtex,
author = {{CTAN}},
title = {Package {BibTeX}},
howpublished = {\url{https://ctan.org/pkg/bibtex}},
note = {Accessed: 2026-10-01}
}
A complete entry with a personal author and a publication year:
@misc{norvig2001,
author = {Norvig, Peter},
title = {Teach Yourself Programming in Ten Years},
howpublished = {\url{https://norvig.com/21-days.html}},
year = {2001},
note = {Accessed: 2026-10-01}
}
The \url command needs the url or the hyperref package in your document:
\usepackage{url} % or: \usepackage{hyperref} for clickable links
Fields
@misc has no required fields. The standard styles use these:
| Field | Required | Use for a website |
|---|---|---|
author |
no | Person or organization responsible for the page |
title |
no | Title of the page |
howpublished |
no | The address, wrapped in \url{...} |
year, month |
no | Date of publication or last revision |
note |
no | Access date, printed at the end |
key |
no | Sorting and labels when there is no author |
url, urldate and doi are not standard fields. The standard styles ignore them without a warning.
How it is typeset
The plain style prints the complete example as:
Peter Norvig. Teach yourself programming in ten years.
https://norvig.com/21-days.html, 2001. Accessed: 2026-10-01.
The url and urldate fields
Many newer styles print a url field on their own, so the entry can be written like this:
@misc{norvig2001url,
author = {Norvig, Peter},
title = {Teach Yourself Programming in Ten Years},
year = {2001},
url = {https://norvig.com/21-days.html},
urldate = {2026-10-01}
}
What happens to these two fields depends on the style:
| Style | url |
urldate |
|---|---|---|
plain, abbrv, alpha, unsrt |
ignored | ignored |
plainnat, abbrvnat, unsrtnat (natbib) |
printed as “URL …” | ignored |
IEEEtran |
printed as “[Online]. Available: …” | ignored |
| biblatex | printed | printed as “(visited on …)” |
With a BibTeX style, keep the access date in note. Don’t fill both howpublished and url with the address, or styles that print url show it twice. See bibliography styles for choosing a style.
@online
@online is a biblatex type for sources that exist only on the web:
@online{norvig2001online,
author = {Norvig, Peter},
title = {Teach Yourself Programming in Ten Years},
year = {2001},
url = {https://norvig.com/21-days.html},
urldate = {2026-10-01}
}
biblatex’s default style prints:
Peter Norvig. Teach Yourself Programming in Ten Years. 2001. url:
https://norvig.com/21-days.html(visited on 10/01/2026).
urldate must be in ISO format (YYYY-MM-DD); biblatex formats it for the document language. @electronic and @www are aliases of @online.
Some BibTeX styles define the type too. IEEEtran accepts @online and @electronic. The standard styles and the natbib styles don’t: BibTeX warns that the entry type “isn’t style-file defined” and formats the entry like @misc, which with plain means the URL is lost.
Organizations, missing authors, missing dates
Organization as author. Wrap the name in a second pair of braces. Otherwise BibTeX reads World Health Organization as a person with the last name Organization:
@misc{who-malaria,
author = {{World Health Organization}},
title = {Malaria},
howpublished = {\url{https://www.who.int/news-room/fact-sheets/detail/malaria}},
note = {Accessed: 2026-10-01}
}
No author. Leave author out instead of writing “Anonymous”, and add a key field. BibTeX uses it for sorting and, in styles like alpha, for the label. Without it you get the warning to sort, need author or key.
@misc{wikipedia-bibtex,
key = {BibTeX},
title = {{BibTeX}},
howpublished = {\url{https://en.wikipedia.org/wiki/BibTeX}},
note = {Accessed: 2026-10-01}
}
No date. Leave year out. The standard styles accept that silently; the natbib styles warn about an empty year and print the citation without one. The access date belongs in note or urldate, not in year.
Long URLs and line breaks
\url breaks an address only after certain characters, such as slashes and periods. Long addresses therefore often stick out into the margin. Either of these helps:
% Option 1: allow a break at any character
\usepackage{xurl}
% Option 2: also break at hyphens (set the option before loading hyperref)
\PassOptionsToPackage{hyphens}{url}
\usepackage{hyperref}
With biblatex, raise the counters biburlnumpenalty, biburlucpenalty and biburllcpenalty, e.g. \setcounter{biburlnumpenalty}{9000}, to allow breaks after digits and letters.
Common mistakes
- Using
urlwithplain. The field is ignored and the bibliography shows no address at all. - A URL without
\url. Characters like_,%,#,&and~cause errors or wrong output inhowpublishedandnoteunless they are inside\url{...}. \urlwithout a package. “Undefined control sequence” meansurlorhyperrefisn’t loaded.- Lost capitals.
plainconverts titles to sentence case. Protect names with braces:{BibTeX}. See protecting capital letters. - Access date in
year.yearis the publication date.
Related types
@miscfor software, datasets and arXiv preprints@techreportfor reports, standards and white papers published online@articlefor journal articles, including online-only journals- All entry types