Over the weekend, we migrated our website and application on the new .com domain
We considered that for some time, but started from very cheap io domain and literally did not have money for better, as we are 2 founders bootstrapped company. And generally believe domain is not important until the business start growing.
One month ago, we decided it was time for a change. Our Next.js project, which has been running on papermark.io, was ready for to papermark.com.
We broke down the process into simple, manageable steps to tackle in one day, as it kind of was scary, the scarier was only to buy this domain for $20k.
What you will find in this article?
We’re walking you through our journey from papermark.io to papermark.com in these steps:
🥚 Step 1. Research and defining core steps
🥚 Step 2. Deciding what to migrate and what not
🥚 Step 3. Verifying the new .com domain in GSC and Bing
🥚 Step 4. Adding the new domain in Vercel
🐣 Step 5. Adjusting dependencies: S3 buckets & NextAuth cookies
🐣 Step 6. Updating login callback URLs (LinkedIn, Google, etc.)
🐣 Step 7. Changing all occurrences from to papermark.com
🐣 Step 8. Updating the sitemap
🐥 Step 9. Changing environment variables in Vercel
🐥 Step 10. Deploying the application
🐥 Step 11. Turning on permanent 308 redirects
🐥 Step 12. Using Google Seach Console tool for domain migration
It took us 3 hours to complete it, couple of steps in GSC were made a week ago. Like adding new website there.
What is our project about?
Papermark is on open source document sharing infrastructure with built-in page by page analytics. Alternative to Docsend.
Check out our project on GitHub: papermark GitHub Repository
Don't forget to leave a ⭐ if you find it useful!
Below, we share all the essential details about the migration process and the key adjustments we made.
Why migrate from io to papermark.com?
Credibility and trust I think one of the main reasons.
Papermark started as a side project, and we did not think about domain, but it turned out that we hit a nerve.
Companies were sick and tired of outdated interfaces, slow websites, and overpriced fees for sharing documents and data rooms.
An early M&A customer told us "this market is ripe for an 'open source' disruption". So, we are doing it.
Domain is just another investment in our brand, which we don't know gonna be hit or miss. As we were doing good on our current domain so far. But we got more confident we want to grow Papermark brand further.
Though we would never spend $20k on domain on day 0.
Let’s dive into what we did step by step technically to guarantee smooth transition.
Main challenge in transition: Breaking down some connections between different parts of projects and possible traffic loss.
🥚 Step 1. Research and defining core steps
Before any changes, we took time to research best practices for domain migrations. Posted on Twitter also, asking around what we should do and GPTin it of course. We compiled a checklist and start
🥚 Step 2. Deciding what to migrate
Since Papermark consists of:
- A main website for marketing,
- A dedicated application for users, and
- Shareable links used by our community.
we had to decide whether to migrate all parts together, or just keep some parts on current domain. After careful planning, we opted for a unified domain—ensuring consistency across the board.
🐣 Step 3. Verifying the.com domain in GSC and Bing
Before switching, we verified papermark.com in both Google Search Console and Bing Webmaster Tools. This crucial step ensured that our new domain was recognized and ready to be crawled by search engines.
🐣 Step 4. Adding the new domain in Vercel
Next, we added papermark.com in Vercel. We updated our project settings in the market_pages application to point to the new domain. This step was straightforward thanks to Vercel's user-friendly dashboard.
🐥 Step 5. Adjusting other domain dependencies
We then updated all other dependencies associated with our domain:
- S3 Buckets: We ensured that storage configurations pointed to the new domain.
- NextAuth Cookies: Adjusted cookie domains to work seamlessly with papermark.com.
// Example NextAuth configuration adjustment
export default NextAuth({
cookies: {
sessionToken: {
name: `papermark.com.session-token`,
options: { domain: "papermark.com", secure: true }
},
},
// Other configuration options...
});
🐥 Step 6. Updating login callback URLs
With the new domain, we needed to update our OAuth callback URLs for services like LinkedIn and Google. This ensured that logins remained smooth and secure for our users.
// Example configuration for Google OAuth
{
"client_id": "YOUR_GOOGLE_CLIENT_ID",
"client_secret": "YOUR_GOOGLE_CLIENT_SECRET",
"redirect_uris": ["https://papermark.com/api/auth/callback/google"]
}
🐥 Step 7. Changing all occurrences to papermark.com
A critical step was updating all occurrences of papermark.io in our codebase and marketing content to papermark.com. This included hard-coded URLs, metadata, and social links.
🐥 Step 8. Updating the sitemap
To help search engines quickly understand our new structure, we updated the sitemap on our marketing page. This update included the new domain references, ensuring a smooth SEO transition.
<!-- Example sitemap snippet -->
<url>
<loc>https://papermark.com/</loc>
<lastmod>2025-03-11</lastmod>
</url>
🐥 Step 9. Changing environment variables in Vercel
We then updated the environment variables in Vercel to reflect the new domain. This included variables for API endpoints, OAuth settings, and any third-party integrations.
# Example Vercel environment variable update
vercel env add NEXT_PUBLIC_DOMAIN papermark.com
🐥 Step 10. Deploying the application
Once all configurations were updated, we deployed our application. This step was crucial for testing that everything worked correctly on the new domain before the official switch.
Actually there were some downtime for a moment, as we needed to roll back, as some custom domain links stopped working for a moment
🐥 Step 11. Turning on permanent redirects (308)
To preserve SEO and guide users seamlessly, we set up 308 (permanent) redirects. This ensured that any traffic to the old domain was automatically redirected. 308 is the new version of 301, but you still can use 301.
308 is important for api redirects where you have POST requests because some browsers may change the HTTP method to GET when they see a 301.
🐥 Step 12. Using Google Search Tool Transition
Finally, we utilized Google’s Search Console migration tool. We set up separate transitions for our app and marketing domains, ensuring a smooth and tracked handover to the new domain.
What’s Next for Papermark?
With the migration complete, our focus is now on enhancing the user experience and bringing more amazing contributors.
If you’re following our journey or thinking about migrating your own project, I’d love to hear your thoughts or questions!
If you’re building something similar in the Open Source space, share your project with me—I’m always curious to see new ideas and innovations. Follow our journey and check out our evolving projects at Papermark.
Feel free to give us a star on GitHub if you enjoyed this walkthrough. Happy coding and migrating!
Follow my journey for more insights into tech, development, and digital transitions:
Twitter | LinkedIn | Papermark
Happy migrating!
Top comments (1)
Nice breakdown! Moving a domain can be scary... seems like you got it all covered 🔥