상세 컨텐츠

본문 제목

블로그 주소 변경 팁, 알아야 할것, 잃게 되는 것

블로그 운영

by 푸로그 2019. 2. 18. 00:07

본문


https://notice.tistory.com/2383

티스토리에서 블로그 주소변경이 막힌뒤로 블로그 주소를 어떻게 할까 하다 포스팅도 몇개 안되는데 글을 그냥 다 옮기지 해서 주소 변경을 강행했다.

http://hotbrain.tistory.com 에서 http://runnablecode.tistory.com 으로

알아야 할것(=잃는 것)

아예 다른 도메인을 쓴다는 이야기는, 더 이상 이전 블로그가 가지는 검색 우선순위를 가지지 못한다는 말이다.

네이버, 다음, 구글 검색에서 모두 밀려버리고 말았다.

언제쯤 검색에 반영 될지는 모르겠지만,
그래도 새 술은 새 부대에 담는다는 생각으로 받아 들였다.

팁 쉽게 옮겨 붙이기

같은 Tistory 블로그에서 옮기는 경우

  1. 블로그 주소 설정 확인하기

    포스트 주소를 문자로 설정합니다.
    이렇게 설정해야 추후 Redirect기능을 사용해 옮길 수 있다.

  2. 블로그 글 옮기기
    https://tistory-editor.tistory.com/ 툴을 사용하거나
    혹은 기존 블로그의 게시글을 수정 -> html로 변경하여 새로운 블로그에 복사해서 붙여넣는것.
    (꼭 기존 블로그의 글은 유지시켜 놓자.)

1. 기존 블로그 쉽게 리다이렉트 시키기

기존 블로그의 검색결과를, 새로운 블로그로 redirect되게 만드는 방법

  • Head와 Head사이에 써넣는다.
  • from_url에는 기존의 블로그 주소를
  • dest_url에는 새로운 블로그 주소를 써 넣자.
    ```

@기존 블로그

    <!--Redirect Old blog to New blog-->
    <script language = javascript>
        var from_url = 'hotbrain.tistory.com/notice/107';
        var dest_url = 'www.runnablecode.com/notice/14';
        var online = document.URL;
        if(online.match(from_url)) document.location.href = online.replace(from_url, dest_url);
    </script>    

2. 공지사항도 리다이렉트(Redirect) 시키기

아쉽게도 공지사항의 글 번호는 우리가 설정할 수 없다. (증가되는 방향으로 올라간다.)

  • from_url에는 기존의 블로그의 공지 주소를
  • dest_url에는 새로운 블로그의 공지 주소를 써 넣다.
  • 공지사항도 리다이렉트 시키려면 꼭, 기존 블로그 쉽게 리다이렉트 시키기 보다 본 Script가 위에 있어야 한다.

@기존 블로그

<head>
    ... ...
    ... ...
    <!--Redirect Legacy Notice post-->
    <script language = javascript>
        var from_url = 'hotbrain.tistory.com/notice/107';
        var dest_url = 'www.runnablecode.com/notice/14';
        var online = document.URL;
        if(online.match(from_url)) document.location.href = online.replace(from_url, dest_url);
    </script>    


    <!--Redirect Old site to New site-->
    <!--이하 생략-->    
    ... ...
    ... ...
</head>

3. 새로운 블로그의 tistory 주소를 구매한 도메인으로 리다이렉트(Redirect)

새로운 블로그의 xxx.tistory.com으로 들어오는 것도 구매한 도메인으로 redirect 시키자.

@새로운 블로그

<head>
    ... ...
    ... ...
    <!--Redirect my root domain-->
    <script language = javascript>
        var from_url = 'runnablecode.tistory.com';
        var dest_url = 'www.runnablecode.com';
        var online = document.URL;
        if(online.match(from_url)) document.location.href = online.replace(from_url, dest_url);
    </script>
    ... ...
    ... ...
</head>

4. 같은 도메인임을 알리는 canonical?

  • 검색 bot같은 경우에는
    http://hotbrain.tistory.com
    http://runnablecode.tistory.com
    http://www.runnablecode.com
    위 세개의 사이트 중 무엇이 우선순위가 높은지 모르게 된다. 물론 자체적은 우선순위는 있겠지만 중복게시물이라고 판단하면 Rating이 낮게 나오는 참사가 벌어질 수 있다.
    그래서 head에 다음과 같이 canonical 을 입력해 주게 되면, 이 3개의 주소가 모두 같은 주소라고 인식하게 된다.
<link rel="canonical" href="https://www.runnablecode.com">

사실 아직까지 canonical 기능이 어떻게 검색에 영향을 미치는지는 잘 모르겠다.


관련글 더보기