Citing online sources correctly in LaTeX can be confusing. Especially when it comes to websites. In this tutorial, you’ll learn exactly how to cite a website in LaTeX using BibTeX, complete with ready-to-use examples, templates, and a free citation generator at getbibtex.com.

1. The Basic Idea of Using BibTeX

BibTeX helps you manage citations by keeping them in a separate .bib file. You define each source once, and LaTeX automatically handles the formatting when you cite it in your document. For websites, you can use the @misc entry type, which works perfectly for online materials.

2. Example of a Website Citation in BibTeX

@misc{lamport2025,
  author = {Leslie Lamport},
  title = {LaTeX Project Website},
  year = {2025},
  url = {https://www.latex-project.org/},
  note = {Accessed: 2025-11-02}
}

In your LaTeX file, cite it with \cite{lamport2025} and include your bibliography file with \bibliography{references} and \bibliographystyle{plain}.

3. Tips for Better Website Citations

  • Include access dates: Since websites can change, add a note field like “Accessed: YYYY-MM-DD.”
  • Use clickable links: include \usepackage{url} or \usepackage{hyperref} in your preamble to make URLs clickable.
  • Keep it consistent: Use the same citation style for all online sources.

4. Generate BibTeX Entries Automatically

Writing every BibTeX entry by hand can be tedious. You can instantly generate a correct entry for any URL at getbibtex.com. Just paste the link, and the app creates a properly formatted BibTeX entry ready to copy into your .bib file.

Illustration of citing websites in LaTeX using BibTeX

5. Common Pitfalls to Avoid

  • Don’t forget to escape special LaTeX characters (like { and } in URLs).
  • Always include the url and note fields for clarity.

Conclusion

Citing websites in LaTeX with BibTeX doesn’t have to be complicated. Whether you’re citing a research paper, a blog, or an online tool, use @misc with a url and an access date. To speed up your workflow, use getbibtex.com to generate your BibTeX entries automatically.