Well, do you own this custom domain?
yes and i want this domain to replace peterjdm.free.nf.
Follow this documentation
Yes! If you stay on the same InfinityFree account/server, you can transfer all your files from the old free subdomain to the new custom domain.
A recommended step is to create a .htaccess redirect on your old site so visitors automatically go to your new domain. Example:
# Redirect all traffic to new domain
RewriteEngine On
RewriteCond %{HTTP_HOST} ^peterjdm\.free\.nf$ [NC]
RewriteRule ^(.*)$ https://peterjdigitalmarketing.com/$1 [L,R=301]
-
R=301makes it a permanent redirect (good for SEO). -
Makes sure all old links still work and users land on the new domain.
Tip: Always backup your files before moving or editing .htaccess.
Note: To use a custom domain like peterjdigitalmarketing.com, you must purchase the domain from a registrar (InfinityFree does not provide free custom domains).
Everything else (file transfer, .htaccess redirect) works once you have your own domain.
Or you just use the Redirects tool in the client area to configure the redirect instead of tinkering with .htaccess code yourself.