create account

Wie man eine Webseite mit eigener Domäne deployt - How to set up a webpage and deploy it with your own domain by achimmertens

View this thread on: hive.blogpeakd.comecency.com
· @achimmertens ·
$2.61
Wie man eine Webseite mit eigener Domäne deployt - How to set up a webpage and deploy it with your own domain
Hallo zusammen, Hello everyone (english see below),

Hier möchte ich rudimentär zeigen, wie ich meine Webseite erstellt habe und diese dann mit einer eigenen Domäne verknüpft habe.

# Erstellung einer Webseite mit Lovable.dev
Es gibt viele Wege, einen eigenen Code zu erstellen und zu bearbeiten. Ich benutze zwei Programieroberflächen (IDEs): Lokal verwende ich Visual Studio Code und im Web verwende ich https://lovable.dev. Letzteres hat den Vorteil, dass dort die KI gut integriert ist und man mit wenigen Prompts kompletten, state of the art Code generiert bekommt, dessen Ergebnis, wenn man will, auch direkt aus dem Internet erreichbar ist.
Ich gehe hier nur kurz auf die Besonderheiten ein:

![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/23tHZhJcRU5YQxsorfLPrH943wdPeNao2feFEq49jvpJPjcu42BCUcococGZV7wwiwxUQ.png)
1. Hier erstellt man ein neues Projekt
2. Hier gibt man den Prompt ein
3. Hier togglet man zwischen dem Code und dem Ergebnis (also der Webseite)
4. Hier wird eine Verbindung zu Git ermöglicht
5. Hier wird der Code auf https://projektname.lovable.dev veröffentlicht

Nachdem man ein "Hello World" Programm (oder was auch immer) erstellt hat (Ja, Programmierkenntnisse sind durchaus von Vorteil, vielleicht geht es aber tatsächlich auch ohne), kann man den Code veröffentlichen (Punkt 5). Das Ergebnis sieht dann z.B. so aus:


![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/EpXNQDnwQhJfKy8u5yR3sZPhrjARnH2TbYco2SfiZss5qbUzLbzXCUHHfn9XtQLWZSu.png)

Also schon ganz brauchbar. Man hat eine eigene Webseite und diese steht in der einfachen Variante im Internet zur Verfügung.

Die kostenlose Version von lovable.dev erlaubt nur 5 Prompts pro Tag und 30 pro Monat. Außerdem ist der Domänenname "fewo-mertens.lovable.app" nicht schön (wer weiß, was die Gäste denken, wenn sie "lovable" sehen (Rotlichbezirk?)). 
Diese beiden Probleme bin ich wie folgt angegangen:

# Verknüpfung mit Github
Unter Punkt 4 verbirgt sich eine Vernküpfung mit Github:

![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/Eo2BJ5WfJTxphcegYieFxsdrRA8PzxEmMugK5yrDYSXoddo631qBQt6iWcpfHm4nib1.png)

Wenn man den Anweisungen folgt, wird der Code als neues Projekt in Github angelegt und automatisch synchronisiert:

![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/23tHbTwX1JHEJAmqzyffj4GE5KH3iRQqU85NH73SHXwvvRSiSWbTZjshACJ2JQhLsKdmF.png)

Und damit bin ich in der Lage den Code auch lokal zu verarbeiten:

![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/23t79Kuj9vyYSLN4Y9YiroqUKfwEBV9fwqQL2McEdRo4RyCpvrbRQHUGMP4CekjUvKKfK.png)

Die Readme-Datei, die natürlich auch in Github zu finden ist, erklärt, wie man den Code nach lokal überträgt und synchronisiert.
In Visual Studio Code (VS-Code), kann man über die Plugins den Github Copiloten aktivieren. Der hat mehrere Modi, zwischen denen man wählen kann. Wenn man den Agenten-Modus wählt, kann man ähnlich arbeiten (prompten) wie in lovable.dev, allerdings ist man nicht auf die 5 Prompts pro Tag beschränkt und kann zwischen mehreren KI-Modellen auswählen.

mit dem Dreisatz:
> git add .
> git commit -m "Committext Blablabla"
> git push

synchronisiert man den Code wieder mit lovable.dev. Und wenn man dort auf Publish/Update klickt, sind die Änderungen auch im Netz.
Was jetzt noch fehlt ist die Domäne:

# Eigene Domäne erstellen

Die Domäne habe ich über den Provider https://strato.de bestellt:

![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/23u6X18WVkF4nr4oR5LbBGgw5yLHN7Q1cUN7xBFwwUkoj5ZoKKDzDsoFHXQXkUyKkESUW.png)

Dort sucht man nach dem gewünschten Namen und Endung. Achtung bei den Preisen, die gelten nur für das erste Jahr, danach wird es einiges teuerer. Aber mit 24 €/Jahr komme ich klar.
Die Bestellung ist relativ schnell erfolgt und nach wenigen Minuten war die Domäne verfügbar.

## Email einrichten.
In dem Paket enthalten ist auch eine freie Emailadresse, die ich mir hier konfiguriert habe:

![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/23tHbkj3mV81r8f75ZFxzqfSnVCMt3KXnZX8ZqMPajzBHoT7NACoo8aYocSRmxeZR3bDd.png)

Mit einem Emailclient und folgenden Angaben:

Mailaccount:fewo@amertens.me
MailPasswort
Imapserver:  imap.strato.de:993
smtpserver: smtp.strato.de:465

komme ich nun an die Mails, die an fewo@amertens.me geschickt werden.

# Die Webseite der eigenen Domäne zufügen
Wie erwähnt möchte ich, dass meine Webseite mit meiner neuen Domainadresse erreichbar ist. Diese Verknüpfung erfolgt über den Host, wo meine Webseite dem Internet zur Verfügung gestellt wird. Lovable.dev macht das nur in der Bezahlversion, aber es gibt Alternativen, z.B. Github Pages. Das ist ein Zusatzdienst von Github, also von dort, wo eh schon mein Code liegt.

Um das einzurichten muss man am Code etwas ändern:

In der Datei package.json änderte ich den Anfang wie folgt:
```
"name": "vite_react_shadcn_ts",
  "private": true,
  "homepage": "https://fewo.amertens.me",
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "build:dev": "vite build --mode development",
    "lint": "eslint .",
    "preview": "vite preview",
    "predeploy": "npm run build && echo fewo.amertens.me > dist/CNAME",
    "deploy": "gh-pages -d dist"
  },
```

Es sind also die Homepage-Adresse und ein paar Scripte hinzugekommen.
Das Deploy Script erzeugt einen Dist-Ordner, in den die statische Webseite rein kopiert wird. Dieser Ordner wird als "gh-pages" Branch erzeugt. Dort wird auch eine Datei Namens CNAME erstellt, die als Inhalt meinen Domänenname hat.

Mit dem Befehl:
> npm run build

wird dieser Dist-Ordner erstellt.

Mit dem Befehl:
> npm run deploy

wird dieser Dist-Ordner deployt. 

Jetzt muss in Github auch bekannt gegeben werden, dass dieses Projekt aus dem Internet erreichbar ist und wo die Information über den Domänennamen liegt. Das konfiguriert man im Projekt unter Settings/Pages:


![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/Eo6S6U415JUoKWJRC1aq9t9tVFNWcKQKxdvxbofbU763FgHCdWPUEVetd1bPXfMZ7Tg.png)


Wenn also jemand bei github.io vorbei browst, wird er, wenn er eigentlich nach fewo.amertens.me will, auf meine Webseite weiter geleitet.
Aber wie landet der User bei github.io, wo er doch fewo.amertens.me in seinen Browser eingetippt hat?

# Domaineinstellungen bei Strato
Das liegt am DNS (Domain Name Service). Dies ist ein Adressregister wo hinterlegt ist, wie man welchen Server erreicht. Dort muss fewo.amertens.me umgeleitet werden nach achimmertens.github.io. Und das tun wir bei unserem Domänenprovider Strato wo wir in der Domainverwaltung unter DNS den CNAME (der Name, wo das Githubprojekt gefunden wird, nämlich achimmertens.github.io) eintragen:


![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/23tmmjqSSWjF5kfnxQCzoYQLa2JRrjkXSbnw79Rp6bBGU1VPngKWfg27eLhhxb8TmKuFk.png)


# Ergebnis testen

Mit 
> npm run preview

kann man lokal den Inhalt vom Distordner sehen:

![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/23xAXkabTrAkcsNvHdusVqWpi6UrVWpQg7mmkkkp7rdy9XJ2fvMsFgmksTvv1vXavyjGx.png)

Jetzt lassen wir noch mal laufen:

> npm run build
> npm run deploy

Und mit viel Glück findet man -Tadaaaa - die Webseite nun unter der gewünschten Domäne:


![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/245ceUJQVMXUX1tUyPiG2ZoQMyBmXUN8mJ5mrwrF6dMCaJjqR2Mj8N49Lq4jdbnLQgHit.png)

Übrigens: Die Webseite ist echt, wer möchte darf dort gerne unsere Ferienwohnung buchen.

# Fazit
Jetzt brauche ich lovable.dev nicht mehr, kann es aber als "Zusatzintelligenz" weiter nutzen (solange ich mit dem synchronisieren aufpasse, sonst gibt es Merge Konflikte). Ich habe nun meine Webseite unter github Pages laufen und dort mit meinem Domänennamen verknüpft. Ich kann jetzt Emails an meinen eigenen Domänennamen empfangen.

Das war es fürs Erste, bis demnächst,

Achim Mertens

---
# English

Hello everyone (English see below),

Here I'd like to show, in a nutshell, how I created my website and then linked it to my own domain.

# Creating a website with Lovable.dev
There are many ways to create and edit your own code. I use two programming interfaces (IDEs): locally, I use Visual Studio Code, and on the web, I use https://lovable.dev. The latter has the advantage that the AI ​​is well integrated, and you can generate complete, state-of-the-art code with just a few prompts, the results of which can also be accessed directly from the internet if you wish.
I'll just briefly touch on the specifics here:

![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/23tHZhJcRU5YQxsorfLPrH943wdPeNao2feFEq49jvpJPjcu42BCUcococGZV7wwiwxUQ.png)
1. This is where you create a new project.
2. This is where you enter the prompt.
3. This is where you toggle between the code and the result (i.e., the website).
4. This is where you enable a connection to Git.
5. This is where you publish the code to https://projectname.lovable.dev.

After you've created a "Hello World" program (or whatever) (yes, programming knowledge is definitely beneficial, but you might actually be able to do without it), you can publish the code (point 5). The result looks something like this:

![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/EpXNQDnwQhJfKy8u5yR3sZPhrjARnH2TbYco2SfiZss5qbUzLbzXCUHHfn9XtQLWZSu.png)

So it's quite usable. You have your own website, and the simple version is available online.

The free version of lovable.dev only allows 5 prompts per day and 30 per month. Also, the domain name "fewo-mertens.lovable.app" isn't pretty (who knows what guests think when they see "lovable" (red light district?)). I addressed these two problems as follows:

# Linking to Github
Under point 4, there is a link to Github:

![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/Eo2BJ5WfJTxphcegYieFxsdrRA8PzxEmMugK5yrDYSXoddo631qBQt6iWcpfHm4nib1.png)

If you follow the instructions, the code will be created as a new project on Github and automatically uploaded. Synchronized:

![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/23tHbTwX1JHEJAmqzyffj4GE5KH3iRQqU85NH73SHXwvvRSiSWbTZjshACJ2JQhLsKdmF.png)

And with this, I'm also able to process the code locally:

![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/23t79Kuj9vyYSLN4Y9YiroqUKfwEBV9fwqQL2McEdRo4RyCpvrbRQHUGMP4CekjUvKKfK.png)

The readme file, which can also be found on Github, explains how to transfer the code locally and synchronize it.
In Visual Studio Code (VS Code), you can activate the GitHub Copilot via plugins. It has several modes to choose from. If you choose agent mode, you can work (prompt) similarly to lovable.dev, but you're not limited to the five prompts per day and can choose between multiple AI models.

Using the rule of three:
> git add .
> git commit -m "Commit text Blablabla"
> git push

You synchronize the code back with lovable.dev. And if you click Publish/Update there, the changes are also available online.
All that's missing now is the domain:

# Create your own domain

I ordered the domain through the provider https://strato.de:

![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/23u6X18WVkF4nr4oR5LbBGgw5yLHN7Q1cUN7xBFwwUkoj5ZoKKDzDsoFHXQXkUyKkESUW.png)

There, you search for the desired name and extension. Be careful with the prices; they only apply for the first year; after that, it gets considerably more expensive. But €24/year is fine with me.

The order was completed relatively quickly, and the domain was available within a few minutes.

## Set up email.
The package also includes a free email address, which I configured here:

![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/23tHbkj3mV81r8f75ZFxzqfSnVCMt3KXnZX8ZqMPajzBHoT7NACoo8aYocSRmxeZR3bDd.png)

With an email client and the following information:

Mail account: fewo@amertens.me
Mail password
IMAP server: imap.strato.de:993
SMTP server: smtp.strato.de:465

I can now access the emails sent to fewo@amertens.me.

# Add the website to your own domain
As mentioned, I want my website to be accessible with my new domain address. This link is made via the host where my website is made available to the internet. Lovable.dev only does this in the paid version, but there are alternatives, such as Github Pages. This is an add-on service from Github, where my code is already located.

To set this up, you need to change some of the code:

In the package.json file, I changed the beginning as follows:

```
"name": "vite_react_shadcn_ts",
  "private": true,
  "homepage": "https://fewo.amertens.me",
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "build:dev": "vite build --mode development",
    "lint": "eslint .",
    "preview": "vite preview",
    "predeploy": "npm run build && echo fewo.amertens.me > dist/CNAME",
    "deploy": "gh-pages -d dist"
  },
```
So, the homepage address and a few scripts have been added.
The deploy script creates a dist folder into which the static website is copied. This folder is created as a "gh-pages" branch. A file named CNAME is also created there, which contains my domain name.

This dist folder is created with the command:
> npm run build

.

This dist folder is deployed with the command:
> npm run deploy

.

Now, we also need to announce on Github that this project is accessible from the internet and where the information about the domain name is located. You configure this in the project under Settings/Pages:

![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/Eo6S6U415JUoKWJRC1aq9t9tVFNWcKQKxdvxbofbU763FgHCdWPUEVetd1bPXfMZ7Tg.png)

So if someone browses past github.io, they'll be redirected to my website when they actually want to go to fewo.amertens.me.

But how does the user end up at github.io when they typed fewo.amertens.me into their browser?

# Domain settings at Strato
This is due to the DNS (Domain Name Service). This is an address register that stores how to reach each server. There, fewo.amertens.me must be redirected to achimmertens.github.io. We do this with our domain provider Strato, where we enter the CNAME (the name where the GitHub project is found, namely achimmertens.github.io) in the domain management under DNS:

![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/23tmmjqSSWjF5kfnxQCzoYQLa2JRrjkXSbnw79Rp6bBGU1VPngKWfg27eLhhxb8TmKuFk.png)

# Test the result

With
> npm run preview

you can locally preview the contents of the dist folder see:

![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/23xAXkabTrAkcsNvHdusVqWpi6UrVWpQg7mmkkkp7rdy9XJ2fvMsFgmksTvv1vXavyjGx.png)

Now let's run it again:

> npm run build
> npm run deploy

And with a bit of luck, you'll find—ta-daaa—the website under the desired location. Domain:

![grafik.png](https://files.peakd.com/file/peakd-hive/achimmertens/245ceUJQVMXUX1tUyPiG2ZoQMyBmXUN8mJ5mrwrF6dMCaJjqR2Mj8N49Lq4jdbnLQgHit.png)

By the way: The website is real; anyone who wants to can book our vacation apartment there.

# Conclusion
Now I don't need lovable.dev anymore, but I can continue to use it as "additional intelligence" (as long as I'm careful with synchronization, otherwise there will be merge conflicts). I now have my website running under Github Pages and linked it to my domain name there. I can now receive emails to my own domain name.

That's it for now, see you soon,

Achim Mertens
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorachimmertens
permlinkwie-man-eine-webseite-mit-eigener-domane-deployt-how-to-set-up-a-webpage-and-deploy-it-with-your-own-domain
categoryhive-169321
json_metadata"{"app":"peakd/2025.5.9","format":"markdown","description":"How to set up a website and email server with your own domain name","tags":["doku","develop","javascript","domain","website","email","provider","homepage","docu"],"users":["amertens.me","amertens.me."],"image":["https://files.peakd.com/file/peakd-hive/achimmertens/23tHZhJcRU5YQxsorfLPrH943wdPeNao2feFEq49jvpJPjcu42BCUcococGZV7wwiwxUQ.png","https://files.peakd.com/file/peakd-hive/achimmertens/EpXNQDnwQhJfKy8u5yR3sZPhrjARnH2TbYco2SfiZss5qbUzLbzXCUHHfn9XtQLWZSu.png","https://files.peakd.com/file/peakd-hive/achimmertens/Eo2BJ5WfJTxphcegYieFxsdrRA8PzxEmMugK5yrDYSXoddo631qBQt6iWcpfHm4nib1.png","https://files.peakd.com/file/peakd-hive/achimmertens/23tHbTwX1JHEJAmqzyffj4GE5KH3iRQqU85NH73SHXwvvRSiSWbTZjshACJ2JQhLsKdmF.png","https://files.peakd.com/file/peakd-hive/achimmertens/23t79Kuj9vyYSLN4Y9YiroqUKfwEBV9fwqQL2McEdRo4RyCpvrbRQHUGMP4CekjUvKKfK.png","https://files.peakd.com/file/peakd-hive/achimmertens/23u6X18WVkF4nr4oR5LbBGgw5yLHN7Q1cUN7xBFwwUkoj5ZoKKDzDsoFHXQXkUyKkESUW.png","https://files.peakd.com/file/peakd-hive/achimmertens/23tHbkj3mV81r8f75ZFxzqfSnVCMt3KXnZX8ZqMPajzBHoT7NACoo8aYocSRmxeZR3bDd.png","https://files.peakd.com/file/peakd-hive/achimmertens/Eo6S6U415JUoKWJRC1aq9t9tVFNWcKQKxdvxbofbU763FgHCdWPUEVetd1bPXfMZ7Tg.png","https://files.peakd.com/file/peakd-hive/achimmertens/23tmmjqSSWjF5kfnxQCzoYQLa2JRrjkXSbnw79Rp6bBGU1VPngKWfg27eLhhxb8TmKuFk.png","https://files.peakd.com/file/peakd-hive/achimmertens/23xAXkabTrAkcsNvHdusVqWpi6UrVWpQg7mmkkkp7rdy9XJ2fvMsFgmksTvv1vXavyjGx.png","https://files.peakd.com/file/peakd-hive/achimmertens/245ceUJQVMXUX1tUyPiG2ZoQMyBmXUN8mJ5mrwrF6dMCaJjqR2Mj8N49Lq4jdbnLQgHit.png"]}"
created2025-06-03 15:25:00
last_update2025-06-03 15:25:00
depth0
children1
last_payout2025-06-10 15:25:00
cashout_time1969-12-31 23:59:59
total_payout_value1.293 HBD
curator_payout_value1.313 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length15,435
author_reputation98,843,531,705,192
root_title"Wie man eine Webseite mit eigener Domäne deployt - How to set up a webpage and deploy it with your own domain "
beneficiaries
0.
accounthive-169321
weight200
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id143,141,358
net_rshares8,144,448,050,708
author_curate_reward""
vote details (57)
@lee1938 ·
https://x.com/lee19389/status/1930010984330211701
#hive #posh
👍  
properties (23)
authorlee1938
permlinksxattx
categoryhive-169321
json_metadata{"tags":["hive","posh"],"app":"hiveblog/0.1"}
created2025-06-03 21:18:00
last_update2025-06-03 21:18:00
depth1
children0
last_payout2025-06-10 21:18:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length61
author_reputation44,634,206,671,789
root_title"Wie man eine Webseite mit eigener Domäne deployt - How to set up a webpage and deploy it with your own domain "
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id143,148,002
net_rshares35,424,745,314
author_curate_reward""
vote details (1)