There are several ways to cite a website in LaTeX. In this short answer to the question, we give three, the easiest being BibLaTeX via the CiteDrive browser extension in the last example.
CiteDrive is a collaborative online reference management tool based on BibTeX that automatically synchronizes with publication systems such as Overleaf and RStudio. They offer a browser extension that allows you to save academic articles directly from the browser and in the correct BibTeX format so that you can, for example, cite them directly in the Overleaf project without having to switch between browser windows/tabs. The extension can also save web pages in BibLaTeX format, automatically capturing the title, URL, and access date.
In BibTeX we use @misc as a workaround and make use of the note field to specify the URl and usually an access date. In this example, url (or hyperref ) is required using usepackage .
@misc title = , author = , year = 2022, note = \url [Accessed: (Use the date of access)]>>
Alternatively, the howpublished field can be used:
@misc title = , author = , year = 2022, note = , howpublished = \url>>
If you use BibLaTeX, which we recommend, the @online entry type is inherently supported and works without a further tweak. You can enter the URL and access date in the fields url and urldate , respectively.
@online title = , author = , year = 2022, url = , urldate = >
People frequently inquire about how to cite web pages using natbib. We emphasize that it works in the same way as BibTeX. Natbib is a tool for styling in-text citations, and it depends on BibTeX as a backend.