Search code examples
htmlhugostatic-sitehugo-content-organization

HUGO: Content Links not working properly in deployed site


I am a beginner in Hugo. I generated a static site, added a theme, added some content. It works in my local. All the links behave as they are supposed to. Then I do "Hugo" to generate deployable files in public directoery. Now I placed this public folder in my server. The home page loads properly, but contents are redirecting to net domain site.

(copy site url and check in you your browser) => https://smehetre.xyz/ Config file below:

baseURL: https://smehtre.xyz/
languageCode: en-us
title: hello friend

theme: "PaperMod"

menu:
    main:
        - identifier: Search
          name: Search
          url: /search/
          weight: 10
        - identifier: Archives
          name: Archives
          url: /archives/
          weight: 20
        - identifier: Resume
          name: Resume
          url: /resume/
          weight: 30
        - identifier: About
          name: About
          url: /about/
          weight: 40

Public folder deployed on my nginx server:

├── 404.html
├── about
│   └── index.html
├── archives
│   └── index.html
├── assets
│   ├── css
│   │   └── stylesheet.min.8e489ec970cd58539487a8f697c827fd0de4aa9f638217b7db51cbc230ff6f95.css
│   └── js
│       ├── highlight.min.2840b7fccd34145847db71a290569594bdbdb00047097f75d6495d162f5d7dff.js
│       └── search.min.994d971a9492abf73721874ff533ba36f8b86300a65b0f03c96111ab1f6f32b2.js
├── categories
│   ├── index.html
│   └── index.xml
├── index.html
├── index.json
├── index.xml
├── page
│   └── 1
│       └── index.html
├── posts
│   ├── index.html
│   ├── index.xml
│   ├── my-first-post
│   │   └── index.html
│   └── page
│       └── 1
│           └── index.html
├── search
│   └── index.html
├── sitemap.xml
└── tags
    ├── index.html
    └── index.xml

Try to click on my first post, or Search or Archives or About page. It redirects to https://net.domain.name/

Please HELP!!!


Solution

  • This looks like a DNS issue, not a Hugo issue.

    According to the WhatsMyDNS Tool your Name Server isn't set at all anywhere (link).

    According to ICANN, you've never actually registered your domain. Godaddy shows the same.

    You need to actually purchase a domain before you can use it.

    If you have purchased your domain, contact your registrar to figure out the issue.

    If you haven't purchased it yet, make sure you do that.