Chapter 5

Deploy to Production

Verify your meta tags work in production

Since OpenGraph+ uses meta tags, there’s nothing extra to configure for production. No API keys, no environment variables, no credentials file. If your meta tags are in your layout, they work everywhere your layout works.

Verify after deploying

After you deploy, open your production site and view the page source. Look for your og:image meta tag and confirm it points to your ogplus.net connection URL with the correct path.

<meta property="og:image" content="https://$OGPLUS_KEY.ogplus.net/your-page-path">
<meta name="twitter:card" content="summary_large_image">

Then paste one of your production URLs into the OpenGraph+ preview tool to confirm the image renders correctly.

Common deployment issues

Wrong path in og:image

If request.path isn’t returning what you expect, check that your production server isn’t rewriting paths or stripping them behind a reverse proxy.

Page looks different in social cards

OpenGraph+ loads your page in a headless browser, so it sees whatever your production server returns. If your page requires authentication, the social card will show your login page. Make sure pages you want social cards for are publicly accessible.

Caching

If you’ve updated your page but the social card still shows old content, check your cache settings. See the Caching guide for how OpenGraph+ uses HTTP cache headers from your Rails app.