Skip to main content

이 버전의 GitHub Enterprise Server는 2023-09-25. 중요한 보안 문제에 대해서도 패치 릴리스가 이루어지지 않습니다. 성능 향상, 향상된 보안, 새로운 기능을 위해 최신 버전의 GitHub Enterprise로 업그레이드합니다. 업그레이드에 대한 도움말은 GitHub Enterprise 지원에 문의하세요.

GitHub Pages 사이트에 대한 사용자 지정 404 페이지 만들기

사용자가 사이트의 존재하지 않는 페이지에 액세스하려고 할 때 사용자 지정 404 오류 페이지를 표시할 수 있습니다.

GitHub Pages는 GitHub Free 및 조직에 대한 GitHub Free가 있는 퍼블릭 리포지토리와 GitHub Pro, GitHub Team, GitHub Enterprise Cloud, GitHub Enterprise Server가 있는 퍼블릭 및 프라이빗 리포지토리에서 사용할 수 있습니다.

  1. On GitHub Enterprise Server, navigate to your site's repository.

  2. Navigate to the publishing source for your site. For more information, see "Configuring a publishing source for your GitHub Pages site."

  3. Above the list of files, using the Add file drop-down, click Create new file.

  4. In the file name field, type 404.html or 404.md.

  5. If you named your file 404.md, add the following YAML front matter to the beginning of the file:

    ---
    permalink: /404.html
    ---
    
  6. Below the YAML front matter, if present, add the content you want to display on your 404 page.

  7. In the "Commit message" field, type a short, meaningful commit message that describes the change you made to the file. You can attribute the commit to more than one author in the commit message. For more information, see "Creating a commit with multiple authors."

  8. Below the commit message fields, decide whether to add your commit to the current branch or to a new branch. If your current branch is the default branch, you should choose to create a new branch for your commit and then create a pull request. For more information, see "Creating a pull request."

    Screenshot of a GitHub pull request showing a radio button to commit directly to the main branch or to create a new branch. New branch is selected.

  9. Click Commit changes or Propose changes.

Further reading