AIHands-on

How I Built a Blog from Scratch with AI (Next.js + AdSense Build Log)

Can a non-developer build a monetized blog with AI? A record of how this blog was built for zero won, including the real errors I hit.

The blog you are reading was built with the help of AI. Here is why I built it myself instead of using Tistory or Naver Blog, and the order I did it in.

Why build it myself

  • To place AdSense freely: AdSense needs you to be able to put code into your site's HTML, so platforms that lock down code access are at a disadvantage.
  • To widen revenue: Beyond ads, I wanted affiliate links, a newsletter and, later, promotion of apps I build, all on one site.
  • Because the site becomes an asset: If a platform changes its policy, the site and posts stay.

Tools used

RoleToolCost
Site frameworkNext.js 16 (static export)Free
WritingMDX (markdown) filesFree
HostingCloudflare Pages free planFree
DomainNone (free Cloudflare address kanglab.pages.dev)0 won
Code and draft postsHark (AI assistant)No extra cost

The original plan was Vercel, but I switched. Vercel's free (Hobby) plan is non-commercial, so adding ads means moving to the $20/month Pro plan. Cloudflare Pages' free plan allows commercial sites, so I started without entering any payment details.

Steps

  1. Pick topics: I narrowed to fields I actually use and work in: AI, Apple, Tesla and ad tech.
  2. Postpone the domain: I first planned to buy kanglab.kr, and it turned out to be available. But until the blog earns money I decided to run it for 0 won on the free kanglab.pages.dev address from Cloudflare. A free subdomain like pages.dev can be registered as a site in AdSense, but I accepted that approval may be less stable than with a domain I own. I built the site so one environment variable change moves it to a new domain later.
  3. Build the skeleton with AI: No grand prompt. I pasted a blog platform comparison table and a note saying "I'd like to add AdSense to a Next.js site I build myself," then sent one line: "do this." From there the AI set up the category structure (/ai, /apple, /tesla, /adtech), the post list, SEO settings (sitemap, RSS, meta tags) and the AdSense slots.
  4. Create required pages: About, privacy policy and contact. AdSense reviews check these by default. I also prepared a spot for the ads.txt file.
  5. Deploy: On October 7, 2026 I created a Cloudflare account (Pages project kanglab), zipped the build output (the out folder) and uploaded it directly in the Cloudflare dashboard (Direct Upload). GitHub auto-deploy is not connected yet.
  6. Search registration: Submitting the sitemap (/sitemap.xml) to Google Search Console and Naver Search Advisor is next. I had not done this at the time of writing.

Where I got stuck

1. The deploy command failed with an authorization error I first tried to deploy with Cloudflare's command-line tool Wrangler using wrangler pages deploy. Even after creating and connecting an API token, uploads were blocked with Authorization failed [code: 8000013]. Rather than keep pushing, I worked around it by switching to Direct Upload, where I uploaded the ZIP in the dashboard, and 163 files went up at once and deployed immediately.

2. A 522 error on first load Right after deploying, the first visit showed a 522 error, but a refresh loaded it normally. It is a brief glitch right after a new deploy, so I did not touch anything.

3. A bug where the CSS vanished as the page loaded After applying a new design, the page looked right for a moment and then lost its styles, leaving only text. The cause was the AdSense code inside <head>. Because there was no AdSense ID yet and the value was empty, I had written {ADSENSE_CLIENT && <script />}; the empty string was printed as text inside <head>, causing a React hydration error (#418), and the styles dropped out along the way. Changing the condition to a ternary, {ADSENSE_CLIENT ? <script /> : null}, fixed it. Right after uploading the fix, the first load once showed an unstyled page, but a hard refresh ignoring the cache showed the new design correctly.

AI makes mistakes too: The CSS bug in item 3 came from one line of conditional logic the AI wrote. The build passed and the code looked fine, but the problem only showed up when opened in a real browser. Even when you delegate to AI, you need to open the result yourself and, if something looks off, ask why it happened.

Principles when writing with AI

I do not publish AI drafts as they are. Only what my own data, such as real receipts and records, can confirm is written as experience, and anything I cannot verify is clearly separated as general information based on official documents. That is why each post is labeled with a type (hands-on review, guide and so on). AdSense also asks for original content, and readers ultimately look for posts they can trust.

Next goals

  • Fill 20 to 30 posts, then apply for AdSense
  • Move to a kanglab.kr domain once there is income
  • Keep sharing progress and actual earnings in this category

The site is less than a week old and AdSense is not connected yet, so earnings are 0 won. When there are numbers, good or bad, I will share them as they are.