| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This standalone docker component can be used as a middleware to prerender your website with Prerender.io when you can’t use other middlewares (or simply when you prefer to do it this way).
E.g. if your website is www.example.com (primary domain), then point www2.example.com (secondary domain) to your website too.
Don't add the secondary domain name as a CNAME for your primary domain, as you will need to re-point your primary domain to this docker component at the end of the setup. Use an A or AAAA record instead. Or use a CNAME that is provided by your hosting provider, but doesn't match your primary domain.
Set your secondary domain, primary domain and API key. You may want to use environment variables later, but we suggest you do it in the file first to avoid environment compatibility issues during your first setup.
make run
curl http://localhost:8080This step highly depends on your infrastructure so it's hard to give you more suggestions here. Still, a common step is to upload this dockerfile to a component-based cloud provider, such as Digital Ocean App Platform, Heroku, AWS ECS or Elastic Beanstalk. Or use your already existing, Docker-capable kubernetes cluster, as you like.
At this point you're good to use a CNAME too, as this is a brand new component.
Send a few request to your primary domain using curl, and see how it responds to different user agents.
The user agent could be anything that doesn't look like a bot, we just added something here for clarity.
curl -A Chrome https://www.example.comcurl -A Googlebot https://www.example.comOptional: You can even set your secondary domain to be authenticated (e.g. with basic auth), so then it will never be indexed by Google, and modify the nginx config to send the authentication along with the request.
| Back | FazBrowse Home | New Git URL |