Embed

Put the oldest pubs on your own website

This is a small box you can put on your own website. It shows a pub's claimed date, the earliest date we can find in the records, and the grade we gave that evidence — or a short list of the oldest pubs near a town, or the pubs on one of our county pages. It costs nothing, you do not need to ask, and it keeps itself up to date: when a document moves a date or a grade here, the box on your site changes with it.

Copying it takes two lines and one paste. If you have ever added a YouTube video to a page, this is easier than that. If you have not, the person who looks after your website will know what to do with it in a minute.

What it is

One small file, about six kilobytes, which your page fetches from us and which then draws the box. It is plain text and one link back to the page the figures came from. It sets no cookies, loads no fonts, no pictures and no adverts, and records nothing at all about your page or the people reading it — we could not tell you how many sites are using it, and that is deliberate. The same rules apply here as on the rest of the site: see the privacy page.

It does not slow your page down. Nothing is fetched until the page has loaded, and the figures come from the same file that draws our own map, so a reader who has been to both has already got it.

Build your two lines

Choose what you want the box to show. It appears below exactly as it will appear on your site, and the two lines underneath are the ones to copy.

What should the box show?

What it will look like

The box is drawn by a small script, so this is where it appears once JavaScript is switched on. The two lines below are the same either way.

The two lines to copy

<div data-oldpubs data-pub="the-bingley-arms-bardsey"></div>
<script src="https://oldpubs.com/embed/v1.js" async></script>

Paste them where you want the box to appear. In most website builders that means adding an HTML block or a custom-code block and pasting both lines into it. If yours will not take the second line, ask whoever set the site up to add it once, anywhere on the page; one copy is enough however many boxes you put up.

The three shapes

If you have copied your two lines above, you are finished and this section is not for you. It is here for the case where somebody wants to change the box later — put a different pub in it, or show six instead of five — without coming back to this page.

The first line is the one that decides what you get, and it is readable English rather than code. data-pub takes the name of a pub's page here — the last part of its web address, so The Bingley Arms is the-bingley-arms-bardsey. That gives one pub, its two dates and its grade.

data-near takes a town and gives the nearest old pubs to it, closest first, with the distance beside each one: useful on a hotel or bed-and-breakfast page, where the question a visitor is really asking is what is within walking distance. data-region takes the address of one of our region pages and gives that list, in the order the page itself uses. Add data-count to ask for a different number, up to ten.

Every box carries one link reading "Data: oldpubs.com", pointing at the page the figures came from, and each pub's name is a link to its own page. That is how somebody reading your site gets to the working behind a date — the documents, the gap, and how we grade the evidence.

What it will not do

It shows no photographs. Every picture on this site belongs to the photographer who took it and carries their name and their licence beside it, and we will not ship those pictures to another site with the credit left behind. It will not tell you a pub is the oldest anything either, because nobody can know that — it says what the house claims and what the record supports, which is the only honest pair of numbers there is.

It carries no advertising, yours or ours. It cannot be styled from your page, and it will not reach into your page's own styling: it keeps to its own box so that neither can break the other. And it will not work with the credit link removed — take that line out and the box draws nothing, which is the deal rather than a trap.

If you want the figures rather than the box — a spreadsheet, a map layer, your own design — the whole set is on the open data page as a file you can download. If you run a pub and want something to put on your own page saying what the records show, there is a badge for that as well.

The one condition

The data is published under a Creative Commons Attribution licence (CC BY 4.0), which means you may use it on any site, including one that sells things, as long as the credit stays visible and followable. That is the only condition and it is not a formality: links are how a small independent site is found at all, and the credit link is what this box is offered for.

It is not permission to copy the whole collection into your own database or to republish it as your own list — for that, read the terms on the open data page and write to us. If a date here is wrong, we would rather hear it than not: tell us what the document says. The figures were last updated on 11 October 2026.

Found something wrong?Suggest a correction