Configure Hubspot robots.txt and image meta tags for social previews
Managing how your content appears when shared is crucial, and Hubspot gives you several ways to control social link previews through robots.txt rules and image meta tags.
This guide explains how to configure access for social crawlers, set Open Graph image tags, and troubleshoot preview issues using the built-in social tools.
How social link previews work in Hubspot
When you share a page on social media, the network first crawls your URL to collect metadata. In Hubspot-hosted content, this data typically comes from Open Graph tags such as title, description, and image.
Social media crawlers may cache this information. That means if your metadata changes, the updated preview is not always shown right away unless you refresh it via network-specific tools.
Supported social networks in Hubspot tools
The social publishing tools support direct preview controls for:
- X (formerly Twitter)
- Instagram (for image and video posts)
While other networks can also read your meta tags, the tools integrated in the platform focus on these major channels for preview management.
Configure Hubspot robots.txt for social crawlers
The robots.txt file determines whether social media crawlers can access your pages and images. In a Hubspot-hosted domain, you can adjust robots settings at the domain level.
Access the robots.txt editor in Hubspot
- Sign in to your account as a super admin or user with website settings permissions.
- Navigate to Settings > Website > Domains & URLs.
- Choose the relevant primary domain used for your website content.
- Locate the Robots.txt or crawling configuration area for that domain.
Changes applied here affect how search engines and social crawlers access your content.
Allow social networks in robots.txt
To ensure link previews work correctly, the robots.txt configuration for your Hubspot domain must not block the user agents used by major social platforms. Typical best practices include:
- Avoid using a global
Disallow: /rule for all user agents. - Confirm you are not blocking specific social crawlers such as
facebookexternalhitorTwitterbot. - Allow access to key content paths where you publish pages and blog posts.
If you maintain custom rules, review them carefully to ensure they do not prevent social networks from reading your page HTML and image URLs.
Set Open Graph image meta tags in Hubspot content
Correctly defined image meta tags help control the thumbnail that appears in social link previews. In Hubspot, these tags can be added or influenced via the page or blog settings.
Configure social images on website pages
- Open your desired page in the website editor.
- Go to the page Settings tab.
- Locate the Featured image or Social image field, depending on your template.
- Upload or select an image that meets recommended social sizing (for example, at least 1200 x 630 pixels for many platforms).
The system generates Open Graph tags such as og:image based on these settings so social platforms can display the correct thumbnail.
Configure social images on blog posts
- Open your blog post in the blog editor.
- Navigate to the Settings area of the post.
- Set the Featured image for the article.
- If available, specify a separate Social sharing image to override the standard thumbnail for social previews only.
When a blog post is shared, the social preview usually uses the image defined in these settings, as long as the platform can access the file via your Hubspot domain.
Verify social meta tags generated by Hubspot
After saving your page or post, you can quickly check the metadata that social platforms will see.
Check page metadata in the content editor
Within the content editor, use available preview or optimization tools to view the social sharing details. In many templates, this includes a quick look at the title, description, and image that Hubspot will expose to crawlers.
For deeper inspection, you can also:
- Open the published page in a browser.
- View the page source.
- Search for
og:title,og:description, andog:imagetags.
This confirms whether your page is outputting the correct Open Graph markup.
Use external social debug tools
Most major networks provide their own debugging tools so you can inspect how they read your Hubspot pages:
- Facebook Sharing Debugger
- LinkedIn Post Inspector
- X (Twitter) Card Validator
Paste your URL into each tool, then request a new scrape to refresh the cached data. This helps surface issues related to robots blocking, missing tags, or outdated previews.
Troubleshoot social preview issues in Hubspot
Sometimes the preview a social network shows does not match what you set in your content. Here are structured steps to resolve common problems.
1. Confirm the page is publicly accessible
Ensure the page is published and not behind password protection. Social crawlers generally cannot access gated content, which can prevent previews from displaying properly.
2. Review robots.txt for conflicts
Return to your Hubspot robots.txt settings and verify that you have not accidentally blocked essential folders or bots. Test by loading the image URL and page URL in an incognito browser window to confirm they are reachable.
3. Validate image file type and size
Social networks may ignore images that are too small, use unsupported formats, or return redirects. When setting a social image in Hubspot:
- Use standard formats like JPG or PNG.
- Ensure minimum pixel dimensions meet platform guidelines.
- Avoid extremely large file sizes that might cause timeouts.
4. Refresh cache with social debug tools
Even after updating your meta tags, networks may show an older preview from cache. Use each platform’s debugging tool to request a new fetch of your Hubspot URL and check whether the updated image and text appear.
5. Compare meta tags with the platform’s requirements
Different platforms prioritize different tags. Confirm that your pages include:
- Open Graph title and description.
- At least one valid
og:imagetag. - A canonical URL that matches what you are sharing.
If you still encounter issues, review the official documentation from your social platform and compare recommended tags with those output by your Hubspot templates.
Best practices for ongoing Hubspot social optimization
To keep your social previews consistent and on brand, implement these ongoing practices:
- Define default social images at the template or site level for pages without specific thumbnails.
- Use descriptive file names for images to support both accessibility and analytics.
- Periodically audit robots.txt to ensure new sections of your Hubspot site are not unintentionally blocked.
- Test critical landing pages in multiple social preview tools before large campaigns.
Document your internal standards so that anyone creating new pages or posts in Hubspot follows the same social optimization steps.
Additional resources
To learn more about these settings directly from the platform documentation, review the original guide on configuring robots.txt and image meta tags for social link previews at this official resource.
If you need strategic help implementing a full funnel marketing and analytics setup around your Hubspot instance, you can explore consulting options from Consultevo.
With careful robots.txt management and well-structured Open Graph tags, your content will consistently display accurate, compelling previews whenever it is shared on social media.
Need Help With Hubspot?
If you want expert help building, automating, or scaling your Hubspot , work with ConsultEvo, a team who has a decade of Hubspot experience.
“`
