↑ ↓ select, Enter open, Esc close

Read the title and meta description of a page with curl

Adjust the values, the command updates live
user@server
curl -s https://example.com/ | tr '\n' ' ' | grep -oiE '<title[^>]*>[^<]*</title>|<meta[^>]*name=.?description[^>]*>'

Shows the <title> and the <meta name="description"> of the page. This quickly checks whether an SEO plugin actually outputs the values, whether they appear twice, or whether the page title is missing after an update. Multiple matches per type are an error.

Note: HTML entities such as &amp; appear unchanged. curl does not see content that is only set via JavaScript.

Also searched as

  • get page title command line
  • check meta description curl
  • what is the title tag of this page
  • check search snippet texts

Related one-liners

All in SEO checks

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.