Entrance Events! Chat Gallery Search Everyone Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
May 13, 2025 - @635.69 (what is this?)
Activity rating: Three Stars Posts & Arts: 38/1k.beats Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts Start New Topic  Submit Art
News: :happy:  :pc: There are community newsletters here! :pc: :happy: Super News: Upload a banner!

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  Making an autoredirect point to the same page on diff domain


« previous next »
Pages: [1] Print
Author Topic: Making an autoredirect point to the same page on diff domain  (Read 88 times)
candycanearter07
Hero Member ⚓︎
*****


i like slimes

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: candycanearter
Itch.io: My Games
RSS: RSS

View Profile WWWArt

Goomy, I Choose You!Suck At Something September - Did It!uh oh! a pigeon got in!Artsy Candy CaneJoined 2024!
« on: May 11, 2025 @727.53 »

Hi,

So I've been considering moving off of a neocities url and buying my own domain. The problem is that there's already a ton of links out there that point to my page.. Redirecting would obviously be the best thing, using the 404 page, but I am worried about like the path on the link being lost if i just linked directly to the domain. Is there any way to make the autoredirect point to the same path in the new domain?

ie
foo.neocities.org/about
-> example.org/about
Logged

new to oldnet be nice




Melooon
Hero Member ⚓︎
*****


So many stars!

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: melon
iMood: Melonking
Itch.io: My Games
RSS: RSS

View Profile WWWArt

Ozwomp wants to know your locationHyperactive DonutGreat Posts PacmanOfficially DogThanks for being rad!a puppy for your travels
« Reply #1 on: May 11, 2025 @732.23 »

If you're planning to get Neocities supporter and add your custom domain there then you don't need to worry about this issue, Neocities will automatically redirect any old links correctly  :wizard:

However if you're switching host entirely then your best bet is to replace every page on neocities with a custom redirect page.

This is an example redirect page:
Code
<html>
    <head>
        <title>My Old page</title>
        <meta http-equiv="refresh" content="4; URL=https://mynew.url/newpage" />
        <meta property="article:modified_time" content="2025-04-11T21:34:00-0700" />
        <style>
            body {
                padding: 30px 30%;
                text-align: center;
                font-size: 2em;
            }
        </style>
    </head>
    <body>
        <p>I have moved stand by to be redirected!!</p>
    </body>
</html>

The key thing is the two meta tags in the head, the first tells the browser to refresh the tab to a new url (the content=4 value is the length of the delay in seconds before redirecting, you can make it 0 for instant redirects), and the second tells the browser to clear its cache so that the refresh 100% happens (just set it to whatever date you setup your new site) - you can also just add this meta data to your old pages head ^^
Logged


everything lost will be recovered, when you drift into the arms of the undiscovered
candycanearter07
Hero Member ⚓︎
*****


i like slimes

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: candycanearter
Itch.io: My Games
RSS: RSS

View Profile WWWArt

Goomy, I Choose You!Suck At Something September - Did It!uh oh! a pigeon got in!Artsy Candy CaneJoined 2024!
« Reply #2 on: May 11, 2025 @769.88 »

So I'd have to manually replace all my pages?
Logged

new to oldnet be nice




nobo
Jr. Member ⚓︎
**


drainnnn

⛺︎ My Room
StatusCafe: nobo
iMood: nobo
Itch.io: My Games
RSS: RSS

View Profile WWW

First 1000 Members!Joined 2023!
« Reply #3 on: May 11, 2025 @847.52 »

You could do it with a script, although that might be advanced. It could be worth it to learn to write the script if there is enough pages, but if there's few enough pages, it might be better to do manually.
Logged

candycanearter07
Hero Member ⚓︎
*****


i like slimes

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: candycanearter
Itch.io: My Games
RSS: RSS

View Profile WWWArt

Goomy, I Choose You!Suck At Something September - Did It!uh oh! a pigeon got in!Artsy Candy CaneJoined 2024!
« Reply #4 on: Today at @177.89 »

theres 400+ pages
Logged

new to oldnet be nice




Pages: [1] Print 
« previous next »
 

Vaguely similar topics! (3)

I am new to making sites and I want some tips to improve.

Started by Icey!Board ☔︎ ∙ I need Help!

Replies: 4
Views: 2700
Last post December 14, 2021 @853.48
by Icey!
Website example page

Started by Icey!Board ✁ ∙ Web Crafting

Replies: 3
Views: 2985
Last post December 16, 2021 @285.10
by cinni
php heck: making a search engine

Started by cinniBoard ☔︎ ∙ I need Help!

Replies: 2
Views: 2416
Last post February 22, 2022 @256.30
by ellievoyyd

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | ~ Send Feedback ~ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi